Session: Django HTML and XML Validator
Diese Session wurde am 1. November 2022 gehalten.
Django provides templates to render HTML pages. These are essentially HTML files mixed with additional programmable markup. Because of this extension, they are generally not valid HTML, and consequently cannot be validated uses common tools like tidy.
Middleware solutions exist to validate the HTML actually rendered from the template. However, most of them either send your HTML to external sites for validation or require the installation of external tools.
The middleware presented in this talk uses lxml to quickly and localy validate HTML generated from Django templates.