--
Ticket URL: <https://code.djangoproject.com/ticket/18494>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: stefantalpalaru (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
See the attached patch for a simple fix. I've tried to write a test for
regressiontests but gave up in the process.
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:1>
Comment (by stefantalpalaru):
Better patch that only adds the unnamed matches from the parent pattern.
I've also added a test.
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:2>
* cc: eduardocereto@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:3>
* status: new => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
This is not a bug -- the docs specifically cover the current behaviour:
https://docs.djangoproject.com/en/1.4/topics/http/urls/#the-matching-
grouping-algorithm.
I can't see how we could introduce this without being backwards
incompatible (someone may be using a mix and expecting the conf to ignore
the unnamed groups).
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:4>
* status: closed => reopened
* resolution: wontfix =>
* type: New feature => Bug
Comment:
@!SmileyChris, thanks for pointing that out. However, the documentation
at that link states that positional arguments will be passed to view
functions as long as there are no named arguments. My included project
demonstrates that this is not working properly with included urlconfs. I
have two suggestions:
1. Have positional arguments passed to views as long as there are no named
arguments, even when they were captured before included urlconfs, as per
the matching-grouping algorithm documentation at your link.
2. If this is too difficult to implement, update the documentation at:
https://docs.djangoproject.com/en/1.4/topics/http/urls/#captured-
parameters
to say that positional arguments are never passed to views when they are
captured before included urlconfs. Also update the matching-grouping
algorithm documentation to say this.
Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:5>
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:7>
* status: new => closed
* resolution: => duplicate
Comment:
This is a duplicate of #12943 and was recently fixed.
--
Ticket URL: <https://code.djangoproject.com/ticket/18494#comment:8>