fixing more django compatibility issues