Compatibility for django 1.4, not only 1.6