better performence in compatibility changes for newer versions of django