I see your point.

In your example, if the query string is left off, I would just show a  
blank form, unless there is some overriding reason that they couldn't  
fill in one or more of the fields.

But I guess sometimes you have to deviate from the rules.

Corey

On Sep 22, 2006, at 3:06 PM, gabor wrote:

>
> Corey Oordt wrote:
>> I'm not sure I can appreciate why you would require a URL to have a
>> query string. It seems to go against the anti-crufty URLs that Django
>> is trying to avoid.
>>
>> Query strings, if I understand them correctly are really meant to
>> provide a subset or context of an otherwise working page.
>>
>> So with that in mind, I would recommend that you show a page with
>> empty results, such as "No results were found."
>
> generally i agree with you (URLs must be nice and simple).
>
> the problem i sometimes have is with data that is not hierarchic.
>
> imagine that you want to show a form, and you would like to prefill  
> some
> of it's fields...
>
> one way is to do something like:
>
> http://bla.com/forms/[EMAIL PROTECTED]&urgent=1
>
> how would you propose to do this without query-strings?
>
> gabor
>
>
>>
>> Corey
>>
>> On Sep 22, 2006, at 9:28 AM, Gábor Farkas wrote:
>>
>>> hi,
>>>
>>> imagine that you have a view function, that requires a parameter in
>>> the
>>> querystring.
>>>
>>> for example, it needs to have:
>>>
>>> http://foo.com/bla/?param=15
>>>
>>> now, what should happen if it gets:
>>>
>>> http://foo.com/bla/
>>>
>>> ?
>>>
>>> in this case, technically the user should not be able to have the  
>>> url
>>> without the querystring, except if he is playing with the url :)
>>>
>>> i mean "what is the most standard-conformant and correct response"?
>>>
>>> http-404 certainly not imho.
>>> http-500 seems also wrong, because there was no unexpected error in
>>> the
>>> server.
>>>
>>> http-400 bad request maybe?
>>>
>>>
>>> simply returning a http-200 with an error page seems to be the wrong
>>> thing to do.
>>>
>>>
>>> gabor
>>>
>>
>>
>>>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to