Fix problem with Django 1.5