Google Groups Home
Help | Sign in
placing querydict in session wipes all session variables
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Chambers  
View profile  
 More options May 13 2008, 11:24 pm
From: Mike Chambers <mikechamb...@gmail.com>
Date: Tue, 13 May 2008 20:24:31 -0700
Local: Tues, May 13 2008 11:24 pm
Subject: placing querydict in session wipes all session variables
I have been trying to track down and issue, and I think I may have
discovered a bug. However, before I log it, I wanted to post here and
ask what the expected behavior is.

I am using a pretty recent build.

The issue is that it appears trying to store a QueryDict (request.POST,
or a copy of a QueryDict) in the session, will wipe all session data.

You can see the original thread here:

http://groups.google.com/group/django-users/browse_thread/thread/260d...

Basically:

request.session['form_post_data'] = request.POST.copy()
request.session['foo'] = "bar"

Then, in another request:

print request.session.keys()
prints []

(i.e. no keys)

But:

request.session['foo'] = "bar"

then in another request:

print request.session.keys()
prints ['foo']

There seems to be two potential issues:

1. Cannot store request.POST.copy() or request.POST in the session
(should you be able to do this?)
2. Trying to place request.POST.copy() in the session wipes all session
values.

I am relatively new to django, so I may be missing something obvious. If
it looks like a bug, then I will put together a more complete example,
and log it.

mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Dunck  
View profile  
 More options May 13 2008, 11:59 pm
From: "Jeremy Dunck" <jdu...@gmail.com>
Date: Tue, 13 May 2008 22:59:38 -0500
Local: Tues, May 13 2008 11:59 pm
Subject: Re: placing querydict in session wipes all session variables
On Tue, May 13, 2008 at 10:24 PM, Mike Chambers <mikechamb...@gmail.com> wrote:

...

> request.session['form_post_data'] = request.POST.copy()
> request.session['foo'] = "bar"

> Then, in another request:

> print request.session.keys()
> prints []

Definitely sounds like a bug.

What revision of Django?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Chambers  
View profile  
 More options May 14 2008, 12:03 am
From: Mike Chambers <mikechamb...@gmail.com>
Date: Tue, 13 May 2008 21:03:16 -0700
Local: Wed, May 14 2008 12:03 am
Subject: Re: placing querydict in session wipes all session variables
Nightly build from subversion.

Ill put together a simple test. When posting a test, should I post an
entire project, or just the relevant parts?

mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Chambers  
View profile  
 More options May 14 2008, 12:47 am
From: Mike Chambers <mikechamb...@gmail.com>
Date: Tue, 13 May 2008 21:47:38 -0700
Local: Wed, May 14 2008 12:47 am
Subject: Re: placing querydict in session wipes all session variables
I logged the issue here:

http://code.djangoproject.com/ticket/7233

and uploaded a test case.

mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RajeshD  
View profile  
 More options May 14 2008, 2:56 pm
From: RajeshD <rajesh.dha...@gmail.com>
Date: Wed, 14 May 2008 11:56:09 -0700 (PDT)
Local: Wed, May 14 2008 2:56 pm
Subject: Re: placing querydict in session wipes all session variables
Hi Mike,

> http://code.djangoproject.com/ticket/7233

> and uploaded a test case.

I've just uploaded a patch to that ticket. Hopefully, others can
review.

-Rajesh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google