Fixing deprecation warning in Django 1.6