django - include sessions inside an inclusion -


Grass throat, I can not seem to include the request. Any ideas how can I get this data? Sessions are my own, custom ones.

looks like my inclusion

  @ register.include_tag ('base / side_bar.html', le_context = true) def show_ side_bar (context) : Model = Model.Objects.All () creates = Make.objects.all () request = context ['request'] return {'creates': creates 'model': model,}  < This error is exited and says 

  the exception was caught while rendering: 'request'  

and Call it to

  {% load extras%} {% show_side_bar%}  

thanks

< Div class = "Post-text" itemprop = "text">

For the request variable in your template reference, the django.core.context_processors.request reference processor can be found in your Must be in TEMPLATE_CONTEXT_PROCESSORS setting move, this is not by default if you want to get it from this context, then you have to add it to your settings. (For more information about reference processors, see.)


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -