Update admin.py

Backward compatibility