And, if your really want to, you can do all that manually without using
django rendering facilities - since nothing forces you to do that. It's
just few convenience tools to create something to start with.
That way you have full control over your forms and how they look like
and where are all the fields placed.
And to use bootstrap you don't need any special package, you can do it
without it just fine.
On 09.05.2017 12:13, Melvyn Sopacua wrote:
On Friday 05 May 2017 06:17:12 guettli wrote:
> Am Donnerstag, 4. Mai 2017 16:03:25 UTC+2 schrieb Todor Velichkov:
> > Take a look at:
> > 1) Form rendering options
> > <https://docs.djangoproject.com/en/1.11/topics/forms/#form-rendering
> > -options> 2) Outputting forms as HTML
> > <https://docs.djangoproject.com/en/1.11/ref/forms/api/#outputting-fo
> > rms-as-html>
> >
> > {{ form }} and {{ form.as_table }} are basically the same.
> > So in terms of valid markup <table>{{ form }}</table> would be more
> > correct.
>
> OK, <table>{{ form }}</table> is what I do now. Somehow I am unsure
> if this is really the best way.
There is never a best way. Only a best way for the job.
Django's job is to provide sensible, workable defaults. Table,
paragraph and list view are 3 common ways to render form elements.
If you however use Bootstrap for css, you're much more helped by using
the bootstrap3 package
<https://djangopackages.org/packages/p/django-bootstrap3/>. Example:
<form method="POST">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons submit='Go!' %}{% endbuttons%}
</form>
--
Melvyn Sopacua
--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto: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/9008764.HJ6FAVUOio%40devstation
<https://groups.google.com/d/msgid/django-users/9008764.HJ6FAVUOio%40devstation?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jani Tiainen
--
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/9717aea0-49df-ec2d-0986-5fd184cc0aa5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.