Fixed the DeprecationWarning that happens when using Django 1.5