djangosnippets.org: Latest snippets posted by Eloffhttps://djangosnippets.org/users/Eloff/2010-03-18T20:16:27.258751-05:00Eloffdjango-admin custom filter: IS NULL/IS NOT NULL
2010-03-18T20:16:27.258751-05:00Eloffhttps://djangosnippets.org/snippets/1963/<p>A simple django-admin filter to allow a boolean-like filter for IS NULL/IS NOT NULL.
</p>
<p>By default it applies to CharField, IntegerField, and FileField, but you can change this by editing NullFilterSpec.fields.
</p>
Freely redistributableHTML Prettifier
2008-01-30T10:54:39.795875-06:00Eloffhttps://djangosnippets.org/snippets/570/<p>Tired of scrolling through hundreds of lines of code where the indentation is maddening?</p>
<p>Here's a middleware class that prettifys your html markup so it's nice and consistently indented. Intended only for debugging, and I add it to the middleware stack conditionally on TEMPLATE_DEBUG. Requires BeautifulSoup.</p>
Freely redistributable