Re: [BangPypers] Acessing session variables in template with django

2009-05-23 Thread Puneet Aggarwal
Thanks Gora, Praveen, Its working for me now. ~Puneet On Sat, May 23, 2009 at 8:15 AM, Praveen Kumar < praveen.python.pl...@gmail.com> wrote: > 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

Re: [BangPypers] Acessing session variables in template with django

2009-05-23 Thread Praveen Kumar
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. O

Re: [BangPypers] Acessing session variables in template with django

2009-05-23 Thread Gora Mohanty
On Sat, 23 May 2009 11:03:26 +0530 Puneet Aggarwal 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_

[BangPypers] Acessing session variables in template with django

2009-05-22 Thread Puneet Aggarwal
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 acce