Fix django 1.6.5 breakage