#9038: url tag not working with reverse in 1.0 as it previously did
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner: mtredinnick
Status: assigned | Milestone:
Component: Core framework | Version: 1.0
Resolution: | Keywords: url, reverse
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------------+---------------------------------
Changes (by mtredinnick):
* stage: Unreviewed => Accepted
Comment:
This looks like the right fix, or, at least, fixing the right problem. The
implementation makes me a little nervous because it's essentially
introducing an extra level of nesting in the data structure (which is
shown up by the extra outer loop when working out the match). I've
basically gotten into trouble in the current code by storing the pattern
prefix only once for a whole bunch of possible argument combination (the
`new_matches` list in `_get_reverse_dict()` is the collection of
possibilities for the current pattern prefix. So Russell's patch adds
extra "groups" of pattern + possibility sets, which looks fine. I want to
think about whether there are alternative data structures to use there.
`MultiValueDict` feels shady to me somehow, since I always have to think
about how it works. It's not really a natural Python data structure. Maybe
lists of lists or something explicit might look more comfortable.
I'll try out alternatives, but it will only be variations on this. Thanks
for working this out, Russ. I missed some possibilities in the original
code.
--
Ticket URL: <http://code.djangoproject.com/ticket/9038#comment:4>
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
-~----------~----~----~----~------~----~------~--~---