Fix DeprecationWarning in Django 1.5