On Tue, 2008-03-04 at 18:30 -0800, msoulier wrote: > So, my urlconf is > > urlpatterns = patterns('teleworker.clients.views', > (r'create/$', 'create'), > (r'modify/(?P<id>\d+)/$', 'modify'), > (r'delete/(?P<id>\d+)/$', 'delete'), > (r'page/(?P<page>\d+)/(?P<orderby>\w+)/(?P<direction>\w+)/$', > 'list'), > (r'page/(?P<page>\d+)/$', 'list'), > (r'^$', 'list'), > ) > > The list function is > > def list(request, page=1, orderby='clientid', direction='forward', > filter=None): > > When I try to use the url tag to get a url to this function, it only > matches the last line of the urlconf. > > {% url teleworker.clients.views.list > page=1,orderby=clientid,direction=forward %}
It's a slight bug in the reverse resolving system when their are non-unique matches. Ideally, it should have picked up the more specific match and/or match nothing if you pass in too many parameters. However, both of those are quite fiddly to introduce and keep the code simple. I'm slowly working on fixing this on my local machine, but it's not there yet. In the meantime, use the url(...) form for your url patterns and give each one that might cause confusion a unique name. That way you can refer to them uniquely in the {% url ... %} tag. Regards, Malcolm -- The hardness of butter is directly proportional to the softness of the bread. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---