Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread Kev Dwyer
On Sun, 14 Feb 2010 08:30:05 -0800, Achim Domma wrote: > Hi Kev, > > thanks for the hint. Trying different solutions I introduced indeed a > typo. Now I can see the username and is_authenticated works as expected. > But still curious: Is there a good reason, why I have to pass > RequestContext

Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread Achim Domma
Hi Kev, thanks for the hint. Trying different solutions I introduced indeed a typo. Now I can see the username and is_authenticated works as expected. But still curious: Is there a good reason, why I have to pass RequestContext each time? Whenever I'm using Django and having the feeling to

Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread andreas schmid
Kev Dwyer wrote: > On Sun, 14 Feb 2010 01:19:41 -0800, Achim Domma wrote: > > >> Hi, >> >> depending on if a user is logged in or not, I want to display a "login" >> form or a "logout" button. I tried to use this code snippet: >> >> http://docs.djangoproject.com/en/1.1/topics/auth/#id6 >> >> If

Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread Kev Dwyer
On Sun, 14 Feb 2010 01:19:41 -0800, Achim Domma wrote: > Hi, > > depending on if a user is logged in or not, I want to display a "login" > form or a "logout" button. I tried to use this code snippet: > > http://docs.djangoproject.com/en/1.1/topics/auth/#id6 > > If I render my view using

RequestContext and user.is_authenticated confusion

2010-02-14 Thread Achim Domma
Hi, depending on if a user is logged in or not, I want to display a "login" form or a "logout" button. I tried to use this code snippet: http://docs.djangoproject.com/en/1.1/topics/auth/#id6 If I render my view using render_to_response("myTemplate.html") the user variable is empty. If I use