Fix django 1.7 deprecation warnings