fix error in django 1.4.2