Thanks a lot, i did miss to pass
context_instance=RequestContext(request) in
my view code
def access(request):
return
render_to_response('tool.html',context_instance=RequestContext(request))
after I added "context_instance=RequestContext(request)"
It is working now like a charm!
On Thu, Feb 4, 2010 at 2:39 PM, weiwei wrote:
> Thanks..
>
> Here is my code
>
>
You repeated the code for the template tag and the context processors
setting; that's not what I asked for.
I still don't see the code for the view that renders the template that
Thanks..
Here is my code
from django import template
from django.template import RequestContext
register = template.Library()
@register.inclusion_tag('userinfo.html',takes_context = True)
def userinfo(context):
request = context['request']
address = request.session['address']
On Thu, Feb 4, 2010 at 1:41 PM, weiwei wrote:
> "DJANGO.CORE.CONTEXT_PROCESSORS.REQUEST
> If TEMPLATE_CONTEXT_PROCESSORS contains this processor, every
> RequestContext will contain a variable request, which is the current
> HttpRequest. Note that this processor is
"DJANGO.CORE.CONTEXT_PROCESSORS.REQUEST
If TEMPLATE_CONTEXT_PROCESSORS contains this processor, every
RequestContext will contain a variable request, which is the current
HttpRequest. Note that this processor is not enabled by default;
you'll have to activate it. " from this page
5 matches
Mail list logo