Fix for previous versions of Django