[BangPypers] Acessing session variables in template with django
Praveen Kumar
praveen.python.plone at gmail.com
Sat May 23 17:15:21 CEST 2009
First of all refer the doc of Django what Gora suggested you.
Use the print statement or pdb to trace the line.
I have doubt in the line
request.session['cityname'] = *cityname*
you should write request.session['cityname'] = *request*.POST[cityname] or
just check the value of cityname.
Thanks.
On Sat, May 23, 2009 at 1:01 PM, Gora Mohanty <gora at srijan.in> wrote:
> On Sat, 23 May 2009 11:03:26 +0530
> Puneet Aggarwal <look4puneet at 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
> [...]
>
> This should work. Have you set MIDDLEWARE_CLASSES properly
> in settings.py, and added django.contrib.sessions to your
> INSTALLED_APPS? See the top of
> http://docs.djangoproject.com/en/dev/topics/http/sessions/
> or the appropriate documentation version for your Django
> version.
>
> Regards,
> Gora
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
--
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090523/e2f2ec03/attachment.htm>
More information about the BangPypers
mailing list