On Sun, 2007-02-18 at 23:26 +0000, omat * gezgin.com wrote: [...] > Another thing is that, if there are multiple patterns matching the > same view function, it seems like, only the first match is considered. > Lets say the artist_photo function has an optional "id" parameter > which defaults to None and below is the patterns pointing that > function. > > (r'^photo/(?P<slug>[-\w]+)/$', views.artist_photo), > (r'^photo/(?P<slug>[-\w]+)/(?P<id>\d+)/$', views.artist_photo), > > In that case, > > {% url views.artist_photo slug=something,id=someint %} > > fails to match anything, where we can expect it to match the second > pattern.
While this particular example can obviously be fixed to work around that problem, this looks like a real bug. Would you mind to file a ticket, please, so that we don't lose this information? I'm wondering whether it's just a problem with the url tag or (possibly more likely) a problem with the reverse url resolving, so it will affect the permalink() decorator as well. If you could file a ticket, we'll have a look at this Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---