Django 1.5 support

fixes the errors on trying to import and use the module as part of a django 1.5 based project