On 07/05/2012 01:20 PM, angelika wrote:
Thanks, but I am asking if there is a way to insert html into a form from the backend code, and *not in the template*?
You can pass the html as a string from a context variable (i believe this should work),
but this is not a very good way to do things.
You are supposed to use django as suggested.The philosophy is
that html code and in general the frontend operations are being held
only in the templates and vice versa, backend operations only in the backend,
in order to ease and separate these tasks.

E.g. Better solution: you can pass a boolean or sth (foo) to the template and with a template tag like:
{% if foo %}display html here {% endif %}

Please explain what your problem is or what do you want to do.
I am pretty sure that there is a better solution than loading html code from the backend.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to