* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted
Comment:
trevor's comment demonstrates a genuine bug.
--
Ticket URL: <https://code.djangoproject.com/ticket/7571#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by micfan):
it seems okay now:
{{{
reverse('test', args=['foo', 'bar', 'bat'])
# gives:
'/foo/bar/bat/'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/7571#comment:11>
* status: new => assigned
* owner: nobody => afuna
Comment:
So, it looks like this is actually two things.
The original issue as described has been fixed. This is a case of outer
regex + included regex, both using named groups. There's a test case in
urlpatterns_reverse/tests.py that matches and confirms:
`('inner-extra', '/outer/42/extra/inner/', ['42', 'inner'], {}),` in
`test_data`
where the relevant url patterns are: `url(r'^outer/(?P<outer>\d+)/',
include('urlpatterns_reverse.included_urls')),` and
`url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"),`
comment:6 is a different thing and that one is still broken. That is a
case of both the outer and inner regex using positional parameters, and
the positions overlapping when the inner regex is appended to the outer
regex. So for example:
outer regex: `outer/(\d+)/`
inner regx: `inner/(\d+)/`
arguments: 123, 456
resolves to /outer/123/inner/123/
PR: https://github.com/django/django/pull/2375
--
Ticket URL: <https://code.djangoproject.com/ticket/7571#comment:13>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"5d568bcfa66916e3de61e0090c724c899debd981"]:
{{{
#!CommitTicketReference repository=""
revision="5d568bcfa66916e3de61e0090c724c899debd981"
Fixed #7571 -- Fixed parameter matching in include()'d urlpattern
Fixed URL resolving in the case where an outer regex includes an inner
regex and both regexes use positional parameters instead of named
groups, causing the outer regex's parameters to override the inner
regex's.
Modified the regex url resolver so that it will concatenates and then
normalizes, instead of normalizing and then concatenating.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/7571#comment:14>