Hi Knut,
Actually, what would help you here is custom model field + form field
+ widget.
For example, the following combination based on Babel (http://
babel.edgewall.org/) could be used:
class DecimalWidget(forms.TextInput):
def render(self, name, value, attrs=None):
locale=get_cur
> /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
> 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
4 matches
Mail list logo