Make it working on Django 1.6