Make this work with Django 1.4