Support HTML5 syntax

120 views
Skip to first unread message

noegry

unread,
Aug 17, 2014, 2:30:33 AM8/17/14
to django-d...@googlegroups.com
Could Django provides a way to render forms in HTML5 syntax? It now render forms in XHTML syntax as 
<input.../>
Or could it in the settings provides an option as USE_HTML5 for applying that?

Florian Apolloner

unread,
Aug 17, 2014, 10:28:43 AM8/17/14
to django-d...@googlegroups.com
That is not just XHTML but perfectly valid HTML5.

Cheers,
Florian

noegry

unread,
Aug 17, 2014, 1:33:17 PM8/17/14
to django-d...@googlegroups.com
But I don't sure that when it's using XHTML and HTML5 syntax together and it should use one syntax for rending views.
It might cause issues when templates are using HTML5 syntax but forms are using XHTML syntax?

Aymeric Augustin

unread,
Aug 17, 2014, 2:36:59 PM8/17/14
to django-d...@googlegroups.com
Browsers are extremely good at parsing whatever gets thrown at them. They accept a mix of self-closing and unclosed tags easily.

If you can describe a use case where self-closing tags create an actual, reproducible problem, then we’ll have a discussion.

If you were just asking for the purity of the generated HTML, we have chosen not to bother as long as pages work.

-- 
Aymeric.



-- 
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1620c231-1002-484a-8166-ac23848aa6c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Florian Apolloner

unread,
Aug 17, 2014, 4:42:05 PM8/17/14
to django-d...@googlegroups.com


On Sunday, August 17, 2014 7:33:17 PM UTC+2, noegry wrote:
It might cause issues when templates are using HTML5 syntax but forms are using XHTML syntax?

The forms are not using XHTML syntax per se, they are valid HTML5 and valid XHTML!

Jesús Lucas Flores

unread,
Aug 17, 2014, 6:14:24 PM8/17/14
to django-d...@googlegroups.com

You can use Django Crispyforms

--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
Reply all
Reply to author
Forward
0 new messages