#4915: A smarter resolver: try to disambiguate URL patterns
-------------------------------+--------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: mtredinnick
Status: new | Component: Core framework
Version: SVN | Resolution:
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 1
-------------------------------+--------------------------------------------
Changes (by mtredinnick):
* owner: adrian => mtredinnick
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Cool, thanks for the explanation. So you're actually solving a slightly
different problem, which is a known bug, so the patch is most welcome.
Reverse lookups when the parameter list is the only difference doesn't
work well at the moment,you're right, and it's a bug in my book. If you
can fix up a couple of problems with the patch, we'll take this in a
heartbeat.
A few small changes if you've got the motivation (perfect patches get
committed much faster):
1. Add some tests to tests/regressiontests/templates/ . Basically this
will mean adding some URLS to urls.py, possibly create a new view function
in views.py, and then adding some examples showing the disambiguation to
the url tag tests in tests.py -- search for "url01" in tests.py to find
where the existing tests are. This doesn't have to be anything too
extreme: a pair of URL patterns as you describe above and then a url
template tag test for each pattern where the only difference is the
parameters (so two url tag tests).
2. There's a print statement in your patch. Often a big clue it's not
ready to be committed. :-)
3. While your at it, add your name to the AUTHORS file and include that
in the patch.
--
Ticket URL: <http://code.djangoproject.com/ticket/4915#comment:3>
Django Code <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
-~----------~----~----~----~------~----~------~--~---