Opened 18 years ago
Closed 18 years ago
#6266 closed (fixed)
There should be a specific mention of inclusion of request.FILES in the ModelForm documentation
| Reported by: | 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
- Add for FileField and ImageField that the syntax should be:
form = YourForm(request.POST,request.FILES,instance=instance)
- Specifically state that unless is_valid is called, a form with errors will not be returned for correction.
- Specfically state that enctype="multipart/form-data" should be added in the template
- 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 , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.