Opened 16 years ago
Closed 15 years ago
#12074 closed (fixed)
Added as_p and as_ul output for formsets.
| Reported by: | Arthur Debert | Owned by: | nobody | 
|---|---|---|---|
| Component: | Forms | Version: | dev | 
| Severity: | Keywords: | formset template | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
Currently a form can be rendered to html as tables, paragraphs and lists. Formsets can only be rendered to tables. 
It's not a big deal, but the assymetry is confusing. The first thing I ever did with a formset was to use {{formset.as_p}} in a template, and get a blank output.
If there's a good reason not to allow for as_p and as_u for formsets, maybe the documentation should mention it.
Attachments (3)
Change History (8)
by , 16 years ago
| Attachment: | django-formset-as_p-as_ul.diff added | 
|---|
comment:1 by , 16 years ago
| Needs tests: | set | 
|---|---|
| Triage Stage: | Unreviewed → Accepted | 
comment:2 by , 15 years ago
comment:3 by , 15 years ago
| Needs tests: | unset | 
|---|
Howdy,
Find attached a patch with as_table in as_p changed to as_p (as noted by @gijs).
The patch also contains doctests for as_table, as_p and as_ul.
Cheers.
by , 15 years ago
| Attachment: | formset-as_p-as_ul-with-tests.patch added | 
|---|
by , 15 years ago
| Attachment: | formset-as_p-as_ul-with-unittests.patch added | 
|---|
comment:5 by , 15 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
line 306 in the patch includes 'form.as_table()' - 'this should be form.as_p()'