Fix for deprecation warning in django 1.7rc2