minimal changes to make the app compatible with Django 1.6