At last finally fix Django 1.7 compatibility (close #7).