Use absolute python paths when importing modules.
Remove middleware layer to be compatible with Django 1.6