djangosnippets.org: Latest snippets tagged with 'tidy'https://djangosnippets.org/tags/tidy/2011-07-08T08:15:22.039890-05:00Prettify HTML5 middleware
2011-07-08T08:15:22.039890-05:00runejuhlhttps://djangosnippets.org/snippets/2482/<p>Slightly updated version of http://djangosnippets.org/snippets/172/ .
Supports new HTML5 tags (even though tidy doesn't).</p>
Freely redistributablePrettify HTML body contents in HTTP response
2010-11-29T14:49:27.115538-06:00n1k0https://djangosnippets.org/snippets/2279/<p>This is an enhancement of snippet <a href="http://djangosnippets.org/snippets/172/">#172</a>. Here I use <a href="http://www.crummy.com/software/BeautifulSoup/">BeautifulSoup</a> — far more easier to install through pip in a virtualenv, and possibly a bit more maintained — to format and properly indent the rendered HTML from templates. </p>
<p>I also added a check to only tidy contents in …</p>
Freely redistributableHTML Validation Middleware
2009-02-06T11:53:00.334271-06:00adamcikhttps://djangosnippets.org/snippets/1312/<p>Development middleware to ensure that responses validate as HTML.</p>
Freely redistributableprettify html
2007-04-11T13:09:48.705877-05:00marchinohttps://djangosnippets.org/snippets/172/<p>with this middleware you can use tidy to prettify your html, just add the class to the <code>MIDDLEWARE_CLASSES</code> setting.</p>
<p>tidy has an enormous number of options, se <a href="http://tidy.sourceforge.net/docs/quickref.html">Tidy Options Reference</a> .</p>
<p>you must have <a href="http://utidylib.berlios.de/">µTidylib</a> installed.</p>
Freely redistributable