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
> 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.
[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
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 }}
> {{
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