djangosnippets.org: Latest snippets tagged with 'cleanup'http://djangosnippets.org/tags/cleanup/2016-09-23T11:59:52.660652-05:00Dead Code Finder
2016-09-23T11:59:52.660652-05:00tclancyhttp://djangosnippets.org/snippets/10588/<p>Rough check for unused methods in our apps. Scans models, views, utils, api, forms and signals
files for what look like methods calls, then looks at all of our classes' methods to ensure each
is called. Do not trust this blindly but it's a good way to get leads on …</p>
Freely redistributable[UPDATE]Filter to resize a ImageField on demand + RATIO OPTION + CLEANUP
2010-08-12T09:02:23.162131-05:00karlsberghttp://djangosnippets.org/snippets/2145/<p>This is the snippet of rafacbd but upgraded... (http://djangosnippets.org/snippets/955/)</p>
<p>Now support keep the aspect ratio or not, changing the size string (x1, x0) this choice use pil.resize or pil.thumbnail.</p>
<p>Remember change the variable CAPS NAMES of the cleanup code.</p>
<p>This cleanup function get the original main image file name and …</p>
Freely redistributableCleanup dirty HTML from a WYSIWYG editor
2009-05-29T09:57:37.422670-05:00denishttp://djangosnippets.org/snippets/1536/<p>My admin allows editing of some html fields using TinyMCE, so I end up with horrible code that contains lots of nested <code><p></code>, <code><div></code>, <code><span></code> tags, and style properties which destroy my layout and consistence.</p>
<p>This tag based on lxml tries to kill as much unneeded tags as …</p>
Freely redistributable