Am Mittwoch, 17. Mai 2017 23:14:04 UTC+2 schrieb James Schneider:
>
>
>
> On May 17, 2017 6:31 AM, "guettli" <guettli...@thomas-guettler.de 
> <javascript:>> wrote:
>
> Hi Russell Keith-Magee,
>
> which version do you use? With <table> or without table?
>
>    <table>{{ form }}</table> vs {{ form }}
>
>
> Both of these are incorrect.
>
> You need to wrap {{ form }} in a <form> HTML tag. If you want it in a 
> table, use {{ form.as_table }}.
>
> https://docs.djangoproject.com/en/1.11/topics/forms/#form-rendering-options
>
> There is no "correct" way, it depends on your template design as to which 
> one is more appropriate.
>


Hi James,

yes, you are right. Both ways need a surrounding <form> tag. Maybe I 
condensed my question too much.

I don't understand the "as_table" part you wrote. AFAIK {{ form.as_table }} 
and {{ form }} return the same result.

Regards,
  Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53df1a23-c1bb-4331-90ed-131483ebe528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to