Port on django 1.6