Changes needed to run without warning using django 1.5.