Sunday, March 31, 2013

Re: how do I specify optional params in url?

Al 31/03/13 21:01, En/na frocco ha escrit:
> url(r'^narrow_category/(\d+)/$', 'catalog.views.narrow_category',
> name="narrow_category"),
> url(r'^narrow_category/(\d+)/(\w+)/$',
> 'catalog.views.narrow_category', name="narrow_category"),
> url(r'^narrow_category/(\d+)/(\w+)/(\d+)/$',
> 'catalog.views.narrow_category', name="narrow_category"),
> url(r'^narrow_category/(\d+)/(\w+)/(\d+)/(\d+)/$',
> 'catalog.views.narrow_category', name="narrow_category"),
> url(r'^narrow_category/(\d+)/(\w+)/(\d+)/(\d+)/(\d+)/$',
> 'catalog.views.narrow_category', name="narrow_category"),
>
> def narrow_category(request, pk, search='', size1='', size2='', size3=''):
>
>
> Page not found (404)
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/narrow_category/8/2657018///


Take a look carefully at the URL that's causing the error:

http://127.0.0.1:8000/narrow_category/8/2657018///

does it matches any of your rules?



HTH

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

No comments:

Post a Comment