Updated massadmin.py for supporting Django 1.5+