fixing more django compatibility issues 4