changes made according to lower django version 1.3.7