backwards compatibility with django 1.4