removing Middleware from settings to use Django default values
Modifying code for pep8 compliance