Update admin.py

Had problems with lines 6 and 46. As far as I could read, those are deprecated now, so I did change them.