Opened 17 years ago

Closed 12 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: dev
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@…> 17 years ago.
Additional as_div method in forms.py
tests.py.diff (10.0 KB ) - added by Jannis <jl@…> 17 years ago.
tests and docs for new as_div()
tests2.py.diff (10.0 KB ) - added by Jannis <jl@…> 17 years ago.
revision of tests and docs for new as_div()

Download all attachments as: .zip

Change History (7)

by Jannis <jl@…>, 17 years ago

Attachment: forms.py.diff added

Additional as_div method in forms.py

by Jannis <jl@…>, 17 years ago

Attachment: tests.py.diff added

tests and docs for new as_div()

by Jannis <jl@…>, 17 years ago

Attachment: tests2.py.diff added

revision of tests and docs for new as_div()

comment:1 by James Bennett, 17 years ago

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 by Adrian Holovaty, 17 years ago

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 by anonymous, 12 years ago

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 by Carl Meyer, 12 years ago

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