On Thursday, March 03, 2011 08:00:45 am luca72 wrote:
> hello i have define this in the url:
> (r'^admin/', include(admin.site.urls)),
>     (r'^accounts/login/$', 'django.contrib.auth.views.login'),
>     (r'^mostro_prima', 'prova.test_sito.views.mostro_prima'),
>     (r'$', 'prova.test_sito.views.mostro_prima'),
>     (r'^inserisco/', 'prova.test_sito.views.inserisco'),
>     (r'^/registrazione/', 'prova.test_sito.views.registrazione'),
>     (r'^scarico/(\d+)', 'prova.test_sito.views.scarico'),
>     (r'^login_us/', 'prova.test_sito.views.login_us'),
>     (r'^registrazione/', 'prova.test_sito.views.registrazione'),
>     (r'^info/(\d)', 'prova.test_sito.views.info'),
>     (r'^chiarimenti/(\d+)', 'prova.test_sito.views.chiarimenti'),
> 
> when i go to www.mysite.net
> i correctly see the page, but when i try to reach other page i get
> every time the same first page, where is my mistake?
> 
> thanks
> 
> Luca

This is the ordering of your urls,  see the example in the page linked[1] 
below.

I'm pretty sure admin/ acounts/login mostro_prima work as expected, it's 
everything underneath that appears broken.  That's because Django searches in 
the order and returns the first matched url pattern.

>From the points listed below the example:
/articles/2003/ would match the first pattern in the list, not the second one, 
because the patterns are tested in order, and the first one is the first test 
to 
pass. Feel free to exploit the ordering to insert special cases like this.  

Mike

[1] http://docs.djangoproject.com/en/1.2/topics/http/urls/#example

-- 
You are sick, twisted and perverted.  I like that in a person.

-- 
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 
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