Re: How to get session data from template

2009-04-05 Thread Malcolm Tredinnick
On Sun, 2009-04-05 at 18:03 -0700, Joshua Partogi wrote: > > > On Apr 6, 12:25 am, Antoni Aloy wrote: > > In your render_to_response don't forget to add > > context_instance=RequestContext(request) > > Thanks. So I have to add this everytime I return render_to_response?

Re: How to get session data from template

2009-04-05 Thread Joshua Partogi
On Apr 6, 12:25 am, Antoni Aloy wrote: > In your render_to_response don't forget to add > context_instance=RequestContext(request) Thanks. So I have to add this everytime I return render_to_response? I thought I only add it on my login views. Many thanks

Re: How to get session data from template

2009-04-05 Thread Antoni Aloy
2009/4/5 Joshua Partogi : > > Dear all, > > I'd like to get session object because I would like to figure out > whether a user is still logged in or not. I tried searching the > documents but could not find a way to do it. > Using {% if user.is_authenticated %}, the user

How to get session data from template

2009-04-05 Thread Joshua Partogi
Dear all, I'd like to get session object because I would like to figure out whether a user is still logged in or not. I tried searching the documents but could not find a way to do it. Using {% if user.is_authenticated %}, the user object is only available in one request but will be dissapeared