Django started adopting HTML5 features since before 2.1. I found changes as
early as 1.11. From the release notes:

https://docs.djangoproject.com/en/dev/releases/1.11/#miscellaneous

> The checked and selected attribute rendered by form widgets now uses
HTML5 boolean syntax rather than XHTML’s checked='checked' and
selected='selected'.

FWIW, I prefer the concise syntax of HTML5 over XHTML and seems to be the
de facto preferred style across much of the web. Style guides such as
Google's recommend it. From
https://google.github.io/styleguide/htmlcssguide.html#HTML:

> Document Type
>
> Use HTML5.
>
> HTML5 (HTML syntax) is preferred for all HTML documents: <!DOCTYPE html>.
>
> (It’s recommended to use HTML, as text/html. Do not use XHTML. XHTML, as
application/xhtml+xml, lacks both browser and infrastructure support and
offers less room for optimization than HTML.)
>
> Although fine with HTML, do not close void elements, i.e. write <br>, not
<br />.

Cheers,
Jon


On Sun, Aug 12, 2018 at 10:34 AM Nils Fredrik Gjerull <n...@gjerull.net>
wrote:

> Den 12. aug. 2018 12:20, skrev Adam Johnson:
>
> You didn't pose an exact question in your message, but I guess it's "Can
> Django officially support XHTML5?"
>
>
> Django has supported XHTML for years, so it came as a surprise to me that
> Django 2.1 broke it. So it is more like "Can Django continue to support
> XHTML, even for HTML5?". But the principle is the same.
>
>
> As it's a stricter subset of HTML5, it seems a valid idea. But at the same
> time, we need to be able to support it going forwards, with test coverage
> and knowledge that this is what we aim for on every PR that adds HTML. Also
> I doubt you'll find many third party packages support XHTML5 too.
>
>
> I use a number of third party libraries, for my site that uses XHTML5. I
> had to patch a few of them, but only small changes.
>
>
> You say there's more to be fixed that just reversing #29038
> <https://code.djangoproject.com/ticket/29038>. What else is there? Would
> you be willing to do all the work?
>
> I am willing to do the work. It is not much that need to be done. Just
> some query-replace to change the generated HTML into valid XML.
>
> Regards
>
> --
> Nils Fredrik Gjerull
> -----------------------------
> "Ministry of Eternal Affairs"
> Computer Department
> ( Not an official title :) )
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/d0645f61-836c-c908-98a9-b99dec62d5f6%40gjerull.net
> <https://groups.google.com/d/msgid/django-developers/d0645f61-836c-c908-98a9-b99dec62d5f6%40gjerull.net?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADhq2b70Qe22rVHbBb5w3HFCmVBB8%2B9jk37gdNcPKXhY8DU15Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to