Hi,

imagine the following use case:

You build an online store where you have sorted products into several 
categories and maybe associated an occasion. Now you want to build URLs. So 
the URL schema that all of the store's owners agree on is:

/<product-slug>/
/<category-slug>/
/<occasion-slug>/

Look simple.

Because product slugs should generally be different to category slugs and 
occasions, you expect no clashes here. And you don't want to bloat the URLs 
by putting product/ and category/ in there. And you also do not want to 
resort making it look cryptic by having just /p/<product-slug>/ and so on.
Then it comes to Django. How do you do that?

Well, at the moment, as far as I am aware, you can't. The first URL will 
match everything all the time, not giving the other views a chance to kick 
in.

So I propose some kind of URL fallthrough. The view could do

raise UrlNotMatched

and the dispatcher goes to the next possible matching view.

Would that be good? Any thoughts?

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


Reply via email to