Prevent deprecation warning with Django 1.5