compatable with django-1.6