#3525: {% url path.to.view %} fails with multiple patterns for the same function
----------------------------+-----------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Template system
Version: SVN | Keywords: url, template
Stage: Unreviewed | Has_patch: 0
----------------------------+-----------------------------------------------
If there are multiple patterns matching the same view function, it seems
like, only the first match is considered.
Lets say a function has an optional "id" parameter which defaults to None
and below is the patterns pointing that function.
(r'^(?P<slug>[-\w]+)/$', views.myfunc),
(r'^(?P<slug>[-\w]+)/(?P<id>\d+)/$', views.myfunc),
In that case,
{% url views.myfunc slug=something,id=someint %}
fails to match anything, where we can expect it to match the second
pattern and return "/something/someint/"
--
Ticket URL: <http://code.djangoproject.com/ticket/3525>
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
-~----------~----~----~----~------~----~------~--~---