Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8857 closed (fixed)

Forms documentation doesn't describe how to handle uploads

Reported by: Kyle Fox Owned by: Jacob
Component: Documentation Version: dev
Severity: Keywords: docs, forms, files, uploads
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The general form documentation Working with Forms does not mention how to handle forms that include files. There is no mention of passing request.FILES into the Form's constructor, nor of the required enctype="multipart/form-data" attribute of the <form> tag.

However, the "next" article Creating forms from models refers back to Working with Forms for handling file uploads.:

" ... a form requires multipart file upload (and hence whether request.FILES must be passed to the form), etc. See Working with Forms for more information."

The documentation for handling form uploads in buried in the Forms API. It would be very useful to have this info (or a link to it) in the introductory "Working with forms" document. At the very least, the reference to "Working with forms" from "Creating forms from models" needs to be removed, since the information is not contained there.

Attachments (1)

modelforms_docs_diff.patch (642 bytes ) - added by prairiedogg 16 years ago.
Changed reference link from working with forms to binding-uploaded-files

Download all attachments as: .zip

Change History (9)

comment:1 by anonymous, 16 years ago

milestone: 1.0

comment:2 by Jacob, 16 years ago

milestone: 1.0post-1.0

comment:3 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:5 by Jacob, 16 years ago

Owner: changed from nobody to Jacob
Status: newassigned

by prairiedogg, 16 years ago

Attachment: modelforms_docs_diff.patch added

Changed reference link from working with forms to binding-uploaded-files

comment:6 by prairiedogg, 16 years ago

Added a patch to modelforms docs that changes the link in the "working with forms" document in accordance with what kylefox described as the "bare minimum" to resolve this ticket.

comment:7 by Alex Gaynor, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r10837.

comment:8 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top