Resolve deprecation warnings in Django 1.7.