Replaced stuff that is deprecated in Django 1.5