Compatibility fix django 1.5