Django 1.7 support

Initial support for django 1.7. Fixes #134
This line breaks on python3

should change it by: except ProgrammingError as e: