Re: Session problem?

2009-08-28 Thread David
Hi Angel, Thanks so much for your prompt reply. Appreciated. Reading your script, I can see that you use my_id=request.user.id. In my code I used username = request.user.username. (notice my commented code? I just tested request.user.id. The problem exists.) So there is no major difference as i

Re: Session problem?

2009-08-28 Thread Angel Cruz
Your implementation is dependent upon session cookies, and I am sure you have a good reason for it. I am as stomped as you are why that is (unless you are like me, who confuses 127.0.0.1:8080 w/ localhost as I open multiple browsers in testing my site...each will have different session cookies).

Re: Session problem?

2009-08-28 Thread David
Hi Angel, Thanks for your reply. I just tested with decorator @login_required. The problem still exists. Following is script for my homepage. # this is the homepage @login_required def my_view(request): if request.session.test_cookie_worked(): #username = request.user.username

Re: Session problem?

2009-08-28 Thread Angel Cruz
How does your view.py look like? I use the decorator @login_required right before each def that I want to ensure is viewable only to the logged-in user. On Fri, Aug 28, 2009 at 12:00 PM, David wrote: > > hello Django community, > > I met this problem and can not find a solution. I wonder if any

Session problem?

2009-08-28 Thread David
hello Django community, I met this problem and can not find a solution. I wonder if any people has met this problem before? Can anybody give a clue or hint how to fix it? For my project, I have enabled sessions and I use contrib.auth.models.User. If one user logins into his/her account, all is p

Re: Session problem

2009-07-27 Thread Subramanyam Vemu
Hi Boris Can you update the code/snippet that you are using coz I faced a similar issue while I was working on a project On Sun, Jul 26, 2009 at 4:06 AM, Boris Ozegovic wrote: > > At the moment I am experiencing difficulties with Django session > middleware. For some reason, my keys (and with

Session problem

2009-07-25 Thread Boris Ozegovic
At the moment I am experiencing difficulties with Django session middleware. For some reason, my keys (and with them my objects) are vanishing from the session. Code, in which changes are made, is really simple and straightforward, and it isn't problem in code. Also, I use session only in this

Re: Weird session problem

2008-05-09 Thread [EMAIL PROTECTED]
Look at the thing I posted. The sessionid= tag is there but it seems to confuse django when there's more than just that in that header. I don't know exactly what causes it though. On May 7, 4:28 pm, finnam <[EMAIL PROTECTED]> wrote: > Isn't it just a matter of session id cookie name? You should

Re: Weird session problem

2008-05-07 Thread finnam
Isn't it just a matter of session id cookie name? You should have different session id cookies for java app server and django. On May 7, 12:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Ahh, I figured it out.  There was a java app server running on this > machine before and I for some r

Re: Weird session problem

2008-05-06 Thread [EMAIL PROTECTED]
Ahh, I figured it out. There was a java app server running on this machine before and I for some reason that caused django to choke. I removed all of them and now it works. Does this seem like a bug? --~--~-~--~~~---~--~~ You received this message because you a

Weird session problem

2008-05-06 Thread [EMAIL PROTECTED]
I am seeing a weird session problem on one machine. I have had my app up and running on one machine for a while and it works fine. I tried copying all the code to another machine, setting up django/flup/ lighttpd and then running it. The app starts up fine but then when I go to log in I get an

Session problem

2008-01-03 Thread Dani
Hi, I think I have a problem with session in django, maybe it will sound to any of you like a known issue. In general, the problem is that sometimes sessions are not saved. It usually happens if the server was up for more than 24 hours. If I restart the server the problem resolves. Code example