Update admin.py

make it compatible to django 1.6