django 1.6 upgrade fix