#12375: updating QueryDict in another dict gives unexpected results.
------------------------------------+---------------------------------------
          Reporter:  hvdklauw       |         Owner:  nobody   
            Status:  new            |     Milestone:           
         Component:  HTTP handling  |       Version:  1.1      
        Resolution:                 |      Keywords:  QueryDict
             Stage:  Accepted       |     Has_patch:  0        
        Needs_docs:  0              |   Needs_tests:  0        
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by russellm):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This is an interesting discrepancy.

 I'm inclined to agree with your analysis - my_dict.update(request.POST)
 should only update values - but it's out of our hands. The python
 internals dictate the behavior in this case.

 Your workaround seems reasonable - i.e., add a dict() method to QueryDict
 (strictly, to MultiValueDict) that provides a dictionary of key-value
 pairs, rather than key-list pairs.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12375#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to