> Hello,
> 
> I'm having a problem with views and url's. If I have a url called  
> "people" that has a callback to "index" works fine, but if I add a  
> url for parameters, let's say "people/<number>/" it does call the  
> index function, instead of the defined one. If I change it, for  
> example to "ppl/<number>/" it works fine. Any ideas? I leave here the  
> code.

> urlpatterns = patterns('',
>      (r'^admin/', include(admin.site.urls)),
>      (r'^people/', 'IeA.gestion.views.index'),
>      (r'^people/(?P<num>\d+)/$', 'IeA.gestion.views.detail'),
> )

First match wins, right?

A lacking $ in the first people rule will match
with a trailing number as well.

So I think you can solve yuour problem by either switching
the order of the people patterns or add a trailing $ to the
first rule: r'^people/$'.

jdl

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to