On Sat, 2006-06-17 at 19:44 -0500, Jeremy Dunck wrote:
> On 6/17/06, Luke Plant <[EMAIL PROTECTED]> wrote:
> > Long version:
> > request.POST is (essentially) a dictionary of post variables.  As such,
> > if it is empty, it evaluates to False, even if the request method is
> > 'POST'.  In your form, you don't have a single 'successful' field --
> > the only field is an <input>, and since it doesn't have a 'name' it
> > can't be successful.
> 
>  A post is a post w/ or w/o successful controls.   How about putting a
> dummy into the dictionary to force true?
> 
> Yeah, this is kludgy, but the alternative is to put in a attribute on
> the request object to say "is this a post?" or force people to fix
> "bugs" in their valid HTML.  :)

There is already a way to test for posts via the request object:
request.META['REQUEST_METHOD']. But your suggestion is not unreasonable,
so best to file a ticket so that it can be considered without being
forgotten.

The implementation side is easy, if we decided to go this route: make
sure that __nonzero__() on the MultiValueDict class returns the right
thing in these cases.

Thanks,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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