On Apr 16, 9:29 am, Aidas Bendoraitis
wrote:
> ...and there should be either a black list of words for
> like del.ici.ous and flickr.com does, or there
> should be another way to differentiate between slugs and
> controlling words...
This may be obvious, but in case it's not, options are exten
/products/by-popularity/
/products/featured/
/products/page/5/
/products/add/
/products/elvis/
/product/in-the-ghetto/
/product/jail-house-rock/
/product/love-me-tender/
On Apr 16, 2:29 pm, Aidas Bendoraitis
wrote:
> Hello,
>
> Recently, we are solving a conceptual question of designing clean ur
I agree on that it's not a good ideo to have actions in GET
parameters. For things like sorting, pagination and the like it's
propably a good idea because you are only changing the view on the
same data. But "add" is a completely new thing. In HTTP terms it
should propably be a PUT request to /pro
> /products/?action=add
> /products/?action=print
> /products/?action=rss
> /products/myproduct/?action=rss
> /products/myproduct/?action=print
>
Those are examples of ugly (not clean anymore) urls.
In such a case, you would need to have a wrapper view in Django, which
would return the results of
Hi Archatas,
On Apr 16, 4:07 pm, "Aidas Bendoraitis [aka Archatas]"
wrote:
> > 8. Using parameters
> > /products/?sort=popularity
> > /products/?filter=featured
> > /products/?page=5
> > /products/add/
> > /products/myproduct/
> > /products/myanotherproduct/
> In th
> 8. Using parameters
> /products/?sort=popularity
> /products/?filter=featured
> /products/?page=5
> /products/add/
> /products/myproduct/
> /products/myanotherproduct/
In this case, you still need to have a black list of words like "add",
"export", "print", "rss",
Here are the advantages and disadvantages I see myself:
> 1. One of the approaches is to use special symbols for the controlling
> words, which are not allowed in slugs, like in last.fm or wikipedia
> does.
(+) url rules for the app might be defined in a separate file
(+) shortness
(-) unusual/un
Ok, best practices time.
Segments:
Only introduces a new segment if it indicates a page that is a logical
descendant of the previous, traversing a category hierarchy would be
the typical example
/books/thrillers/
Query Parameters:
Used to define the viewing parameters of the current level in th
Hi Aidas,
> 7. Using the controlling words before the type of list:
> /by-popularity/products/
> /featured/products/
> /page5/products/
> /add/products/
> /products/myproduct/
> /products/myanotherproduct/
8. Using parameters
/products/?sort=popularity
/products
Hello,
Recently, we are solving a conceptual question of designing clean urls
for list and detail views of objects with slugs.
Let's say we have products with their slugs. In the naive way, the
list view could be accessed by
/products/
and the detail views could be accessed by
/products/
10 matches
Mail list logo