Re: Proposal: shortcut to display one field from newforms

2007-10-30 Thread Brian Rosner
The as_* methods are helpers to display the form fields quickly. As mentioned above you can accomplish exactly what you are describing. Just create a templatetag to make it more DRY. On Oct 30, 2:52 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > On the other hand, it's kind of an edge

Re: Proposal: shortcut to display one field from newforms

2007-10-30 Thread [EMAIL PROTECTED]
> On the other hand, it's kind of an edge case, since if you're using the > same set of tags for every field, it quite limits the amount of > customized layout you can do :) I don't think so - most of the people control the layout via css I think using {{ form.foo.as_p }} is a great idea.

Re: Proposal: shortcut to display one field from newforms

2007-10-29 Thread Collin Grady
[EMAIL PROTECTED] said the following: > 1) just form.FIELDNAME. It's quite obvious and is not occupied by > anything. Uh, yes it is :) {{ form.foo }} prints the input for the foo field > 2) form.show_FIELDNAME > 3) form.show(FIELDNAME), where FIELDNAME is a string. But this one > can't be

Re: Proposal: shortcut to display one field from newforms

2007-10-29 Thread Malcolm Tredinnick
On Mon, 2007-10-29 at 17:29 -0700, [EMAIL PROTECTED] wrote: > Hello everyone, > > Currently when person needs to render form into template using > newforms, he has two options: > 1) Use shortcut as_p / as_table / as_ul > or > 2) Use customised output, something like > {{ field.label_tag }} > {{

Proposal: shortcut to display one field from newforms

2007-10-29 Thread [EMAIL PROTECTED]
Hello everyone, Currently when person needs to render form into template using newforms, he has two options: 1) Use shortcut as_p / as_table / as_ul or 2) Use customised output, something like {{ field.label_tag }} {{ field }} {% if field.help_text %}{{ field.help_text }}{% endif %} {% if