fix bug compitable django 1.5