django 1.6 compatibility updates (backwards-compatible)