Hi,
"rightway" to do things is to keep rendering (html) in the place where
it belongs to - in templates. That's the main functionality of templates.
Unfortunately traditionally Django forms have been doing things wrong
and pushed HTML rendering to Python code - bascially to change your HTML
you need to change Python code, which in production would mean deploying
site again.
django-sniplates [1] is one of such library that pushes rendering
solution to templates. Another alternative is
Fortunately Django 1.11 got template based widget rendering [2]. Which
is the right direction.
But it's really up to you which way you choose.
[1] https://sniplates.readthedocs.io/en/latest/
[2] https://docs.djangoproject.com/en/1.11/ref/forms/renderers/
On 16.05.2017 10:51, guettli wrote:
Am Mittwoch, 10. Mai 2017 10:56:56 UTC+2 schrieb Melvyn Sopacua:
On Tuesday 09 May 2017 14:08:44 Jani Tiainen wrote:
> And to use bootstrap you don't need any special package, you can
do it
> without it just fine.
To render a webpage, you don't need Django you can do just fine
typing HTML. What's your point really?
I know that I can render a webpage without django.
What is the point?
I don't want to do the same thing over and over again.
I search simple, easy and small solutions based on solid basic facts.
This is a basic fact, and AFAIK this basic question is not solved yet.
<table>{{ form }}</table> / vs/{{ form }}
The answer "do what fits" is not an answer for me. I don't want to
waste mental energy and
think about this over and over again.
I know that real super heroes prefer the hard way. I don't like the
hard way. Call me wuss, pussy, weenie if you want to.
--
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/aa114307-d17a-4c6e-b32e-d2533bac5890%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/aa114307-d17a-4c6e-b32e-d2533bac5890%40googlegroups.com?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/3d2f30ae-3f0f-85ba-b97d-2d6274cbf324%40gmail.com.
For more options, visit https://groups.google.com/d/optout.