As in the documentation, variables called “debug” and “sql_queries” should be used in the templates if all the requirements are met.
I installed the following (and checked their values using the debug toolbar ):
DEBUG = True
TEMPLATE_DEBUG = True
TEMPLATE_CONTEXT_PROCESSORS
INTERNAL_IPS = ('127.0.0.1',)
REMOTE_ADDR = '127.0.0.1'
TEMPLATE_STRING_IF_INVALID = "(invalid variable '%s'!)"
When rendering a template containing {{ sql_queries }} {{ debug }}, I get (invalid variable 'sql_queries'!) (invalid variable 'debug'!)as output.
{{ sql_queries }} {{ debug }}
(invalid variable 'sql_queries'!) (invalid variable 'debug'!)
My version of Django is 1.2.3. What am I missing here?
, Context RequestContext? RequestContext.
Context
RequestContext
. RequestContext render_to_response:
render_to_response
return render_to_response("some.template.file", templateArguments, context_instance = RequestContext(request))
Django 1.3 render :
return render(request, "some.template.file", templateArguments)
Source: https://habr.com/ru/post/1769868/More articles:At the gate, how can you update the feedback field from the onSubmit ajax component inside the panel? - javaJquery textarea val () does not accept newline - jqueryIn .Net, how do I decorate a class with an intellisense hint? - .netGetting m2eclipse to match maven classpath - javato determine the change in state of energy - c #Enabling dependencies in (Python) Google App Engine - pythonCreating Calendars - c #Advertising system suitable for ajax applications - ajaxCompilation with header files - cGoogle Chrome загружает источник PHP-скриптов - google-chromeAll Articles