Re: Question about request.user

2009-08-11 Thread David
This fixes the problem. Thanks Gustavo! On Aug 11, 6:07 am, Gustavo Henrique wrote: > maybe a problem with cache. > try this: > > from django.views.decorators.cache import never_cache > @never_cache > def yourview(request): >    # your code here > > -- > Gustavo

Re: Question about request.user

2009-08-11 Thread Gustavo Henrique
maybe a problem with cache. try this: from django.views.decorators.cache import never_cache @never_cache def yourview(request): # your code here -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You

Re: Question about request.user

2009-08-10 Thread David
I tested this again with IE and Firefox. On IE I logined as "peter" and then I logined as "john" on Firefox. Now I checked user in "peter" account with "request.user.username", and I got "john". Can anybody do this test on your machine? Thanks so much. On Aug 10, 2:48 pm, David

Re: Question about request.user

2009-08-10 Thread David
Hi Carlos, Thanks for your reply. I opened two broswers. I first logined as "peter" and I left IE there; then I double-clicked IE icon on my desktop to open a new one. On this new one I logined as "john". There is only one user table as I use "django.contrib.auth.models.User". any more ideas?

Re: Question about request.user

2009-08-10 Thread Carlos A. Carnero Delgado
Hi, On Mon, Aug 10, 2009 at 4:46 PM, David wrote: > Why request.user.username did not bind to "john" in this scenario? > Anybody knows what caused such a problem? And any ideas how to fix > it? Are you using the same web browser? Maybe two tabs? HTH, Carlos.

Question about request.user

2009-08-10 Thread David
hello, Here is what I met. I logined into my Django application online with a username "peter". Then I logined with another username "john". All seemed fine. Now I printed user name in "john" account, and it gave "peter". I used following code. if request.user.is_authenticated(): print