added support for older versions of django