changes for compatibility with Django 1.6

just a few small changes around imports and syntax