Fix #114 with django<1.7 support

tested on django 1.6 and 1.7