#19610: Include enctype in example forms
-------------------------------+--------------------
     Reporter:  will@…         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.4
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 On this page:
 https://docs.djangoproject.com/en/dev/topics/forms/

 It took me ages to figure out the reason files weren't uploading was
 because I'd left out enctype="multipart/form-data" from my <form> tag in
 my template.
 I suggest changing the template examples from:


 {{{
 <form action="/contact/" method="post">{% csrf_token %}
 {{ form.as_p }}
 <input type="submit" value="Submit" />
 </form>
 }}}


 to:


 {{{
 <form action="/contact/" method="post" enctype="multipart/form-data">{%
 csrf_token %}
 {{ form.as_p }}
 <input type="submit" value="Submit" />
 </form>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19610>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to