a bung of django 1.5.1 compantibility fixes