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
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).
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
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
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
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
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
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
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
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
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
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
12 matches
Mail list logo