{"id":199,"date":"2010-11-10T06:52:27","date_gmt":"2010-11-10T05:52:27","guid":{"rendered":"http:\/\/daniel.hepper.net\/blog\/?p=199"},"modified":"2010-11-10T06:52:27","modified_gmt":"2010-11-10T05:52:27","slug":"how-to-fix-variabledoesnotexist-exception-in-django","status":"publish","type":"post","link":"https:\/\/daniel.hepper.net\/blog\/2010\/11\/how-to-fix-variabledoesnotexist-exception-in-django\/","title":{"rendered":"How to fix VariableDoesNotExist exception in Django"},"content":{"rendered":"<p>When Django greets you with this exception:<\/p>\n<p><code>TemplateSyntaxError at \/<\/p>\n<p>Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in...<\/code><\/p>\n<p>you are probably using a template tag that requires the <a href=\"http:\/\/docs.djangoproject.com\/en\/dev\/ref\/templates\/api\/#django-core-context-processors-request\">request context processor<\/a>. Simply add     &#8216;django.core.context_processors.request&#8217; to the TEMPLATE_CONTEXT_PROCESSORS tuple in your settings file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When Django greets you with this exception: TemplateSyntaxError at \/ Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in&#8230; you are probably using a template tag that requires the request context processor. Simply add &#8216;django.core.context_processors.request&#8217; to the TEMPLATE_CONTEXT_PROCESSORS tuple &hellip; <a href=\"https:\/\/daniel.hepper.net\/blog\/2010\/11\/how-to-fix-variabledoesnotexist-exception-in-django\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-django","category-howto"],"_links":{"self":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":1,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/199\/revisions\/200"}],"wp:attachment":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}