let it play nice with django 1.6

make it compatible to django 1.6