Opened 10 years ago

Closed 5 years ago

#3286 closed enhancement (wontfix)

[design-q] Please add newforms as_div() method for printing forms.

Reported by: brooks.travis@… Owned by: Adrian Holovaty
Component: Forms Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the hope of maintaining slightly greater semantic purity in the output forms, you may want to consider allowing priting of forms as <div>s in addition to <p>, <ul>, and <tr>.

Attachments (3)

forms.py.diff (671 bytes) - added by Jannis <jl@…> 10 years ago.
Additional as_div method in forms.py
tests.py.diff (10.0 KB) - added by Jannis <jl@…> 10 years ago.
tests and docs for new as_div()
tests2.py.diff (10.0 KB) - added by Jannis <jl@…> 10 years ago.
revision of tests and docs for new as_div()

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Jannis <jl@…>

Attachment: forms.py.diff added

Additional as_div method in forms.py

Changed 10 years ago by Jannis <jl@…>

Attachment: tests.py.diff added

tests and docs for new as_div()

Changed 10 years ago by Jannis <jl@…>

Attachment: tests2.py.diff added

revision of tests and docs for new as_div()

comment:1 Changed 10 years ago by James Bennett

From the last couple times these sorts of things have been suggested (for example, with an as_dl method), it's been pointed out that these methods are meant to be quick conveniences; newforms will let you write your template any way you want, and the various as_* methods are meant to be few in number, with fine-grained control delegated to templates.

comment:2 Changed 10 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed
Summary: Please add newforms as_div() method for printing forms.[design-q] Please add newforms as_div() method for printing forms.

Closing as wontfix for the same reason pointed out in #3108.

comment:3 Changed 5 years ago by anonymous

Easy pickings: unset
Resolution: wontfix
Status: closedreopened
UI/UX: unset

5 years have passed div's a heavily used for pages styling. Please, reconsider of fixing this.

comment:4 Changed 5 years ago by Carl Meyer

Resolution: wontfix
Status: reopenedclosed

Please don't reopen tickets closed wontfix by a core developer - if you want to discuss the issue, bring it up on the django-developers mailing list for discussion.

The prevalence (or not) of div-based layouts is irrelevant to the reasons given for closing this as wontfix. The "as_*" methods are a quick and inflexible development shortcut; if anything they should be phased out entirely in favor of template-based rendering, certainly not expanded.

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