fix build error on django 1.4
fix build error on django 1.3