patch for compatibility with django-grappelli

Improvements for compatibility with django-grappelli