sehmaschine/django-grappelli — pull request #310 by alexwhittemore (2013-03-24 00:55:33+00:00)
Title: Fix deprecation warning in django 1.5. 

This fix circumvents deprecation warnings, maintaining forwards and
backwards compatibility with Django 1.6 and 1.3. One can't simply
import *, since importing django.conf.urls won't fail under 1.3, but
WILL simply not import url() or patterns()

This code replaces pull requests https://github.com/sehmaschine/django-grappelli/pull/305 and https://github.com/sehmaschine/django-grappelli/pull/301 with code that isn't broken under django 1.3. Copied from the same issue which showed up in dajaxice here: https://github.com/jorgebastida/django-dajaxice/pull/95#issuecomment-15348897