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
/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
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
> /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
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/
> >
> 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
(-)
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
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
9 matches
Mail list logo