When Django greets you with this exception:
TemplateSyntaxError at /
Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in...
you are probably using a template tag that requires the request context processor. Simply add ‘django.core.context_processors.request’ to the TEMPLATE_CONTEXT_PROCESSORS tuple in your settings file.
Wow this is a useless post
Sorry if it didn’t help you. I was facing this problem and adding the context processor was the solution. I appreciate any feedback how to make this post more useful.
I for one found this tip a lifesaver. The error messages didn’t help and this suggestion solved the issue perfectly.
Posts like yours are why I love the internet 🙂
Thanks! That saved me tons of time! I’d have never figured that out!
This saved me a lot of time, I couldn’t figure out what was the problem in my django project. Thank you so much.
Lifesafer. Thanks a bunch.
Pingback: Creating base.html and improving the navigation bar. | Anthony Honstain SDE
Helped me a lot!!
I’m having this now. And the context processor is already there, but django still complains…
It’s possible that you’re sending something to a template tag that should be in quotes.