Added template context processor. I'm not sure what is "django.settings" from task, so I have used project settings

Moved middleware.py from application to project directory. Since middleware is not project specific, I think project dir is better place