updating QueryDict in another dict gives unexpected results.
|Reported by:||hvdklauw||Owned by:||oinopion|
|Cc:||hvdklauw@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I noticed a small "bug" in the QueryDict.
When I have an existing dict and want to add the get or postdata to it using my_dict.update(request.POST).
This results in a dict with all the values as lists. I can understand why the QueryDict might work that way, the same key could have multiple values. Except that the QueryDict
does some magic that when you iterate over it it returns the first item in the list.
This limitation should be documented, and maybe a function should be added to the QueryDict to turn it into a normal dict.
Change History (11)
comment:1 Changed 6 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 5 years ago by oinopion
- Easy pickings unset
- Owner changed from nobody to oinopion
- Status changed from new to assigned
- UI/UX unset
Changed 5 years ago by oinopion
comment:8 Changed 5 years ago by oinopion
- Keywords dceu2011 added
- Triage Stage changed from Accepted to Ready for checkin