Thanks Daniel, Its working fine now. :)
On May 23, 1:39 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 23, 6:34 am, Puneet <look4pun...@gmail.com> wrote: > > > > > Hi All, > > > I am facing issue when I am trying to access session variables in > > django. > > > I am setting the session variable something like : > > > request.session['cityname'] = cityname > > c = RequestContext(request, {'current_date': now}) > > html = t.render(c) > > return HttpResponse(html) > > > And I am trying to access it like : > > > {{ request.session.cityname }} > > and > > {{ request.cityname }} > > > But it does not seem to be working. Any suggestions ? > > > Thanks, > > Puneet > > You need to enable django.core.context_processors.request in the > CONTEXT_PROCESSORS section settings.py - it's not enabled by default. > Seehttp://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-c... > -- > DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---