Fix to Django 1.4