Tweaking to get old Hg version to work on current django 1.4