On Oct 30, 2009, at 8:58 PM, Karen Tracey wrote:
> On Fri, Oct 30, 2009 at 8:30 PM, ssteinerX <sstein...@gmail.com>  
> wrote:
>
> Hi!
>  I'm trying to submit a simple:
>
> <form id="form1" name="form1" method="post" action="/my_action/>
>
> my_action is missing a closing double quote char.

Copy & paste typo, sorry, it was not that way in the actual code.

>  <label for="id_subject">Subject:</label><input id="id_subject"
> type="text" name="subject" maxlength="100" />
>  <input name="foo" type="submit" value="foo_value" />
> </form>
>
>  type form but when I submit, it's nowhere to be found in the REQUEST
> object (GET or POST) that I've been able to find.
>
>  Where does it go?
>
>
> Using cut-and-paste of your form, fixing the missing closing quote,  
> and mapping the /my_action url to a test view function that breaks  
> into pdb, I see:
>
> (Pdb) request.method
> 'POST'
> (Pdb) request.POST
> <QueryDict: {u'foo': [u'foo_value'], u'subject': [u'Subject here']}>
> (Pdb) request.POST['foo']
> u'foo_value'
> (Pdb) request.POST['subject']
> u'Subject here'
> (Pdb)
> (I had entered 'Subject here' in the Subject text box.)
> What are you doing, exactly, that you can't see 'it' in your view?

It appears that I had mis-nested tags and the <form>...</form> was not  
being captured.

Once I fixed up the mis-nesting, my inputs showed up in the REQUEST  
object just like they're supposed to.

Normally validation is the first thing I check but the w3c validator  
can't validate localhost addresses so I had to use the old "cut &  
past" method to submit my HTML.

Thanks,

S











--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to