Opened 17 years ago

Closed 17 years ago

#6266 closed (fixed)

There should be a specific mention of inclusion of request.FILES in the ModelForm documentation

Reported by: kenneth gonsalves <lawgon@…> Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: ModelForm
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

  1. Add for FileField and ImageField that the syntax should be:

form = YourForm(request.POST,request.FILES,instance=instance)

  1. Specifically state that unless is_valid is called, a form with errors will not be returned for correction.
  1. Specfically state that enctype="multipart/form-data" should be added in the template
  1. Specify how to get the file name displayed in the form when a model with one of these fields is loaded for editing

Change History (2)

comment:1 by Malcolm Tredinnick, 17 years ago

Triage Stage: UnreviewedAccepted

None of this is specific to ModelForms and, in fact, most of it is already mentioned in the forms documentation. I think the only things needed to resolve this are to add a note to the modelforms docs to mention they are normal forms and people should have read those docs as well and to address the fourth point in this list.

comment:2 by James Bennett, 17 years ago

Resolution: fixed
Status: newclosed

(In [7305]) Fixed #6266: Added note to docs/modelforms.txt pointing out that they're just standard forms and have all the same methods as standard forms

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