djangosnippets.org: Latest snippets tagged with 'wrap'https://djangosnippets.org/tags/wrap/2015-10-23T15:06:06.037245-05:00Smart wrapping Django admin's delete_selected
2015-10-23T15:06:06.037245-05:00karolyihttps://djangosnippets.org/snippets/10534/<p>The idea here is to wrap the original <code>delete_selected</code> functionality in a way that I shouldn't have to reimplement the templates (confirmation/error response) serving, just extend the original.</p>
<p>What this code does, it wraps the queryset's delete function with a closure, so when it really gets called (after the confirmation), …</p>
Freely redistributableFilter to add zero-width space to break up long words
2012-09-20T16:37:39.563380-05:00jayliewhttps://djangosnippets.org/snippets/2822/<p>If you have long words (no spaces) that are so long that it's messing up your design, add a 0-width space in the word every X chars.</p>
<p>Usage:</p>
<p>Step 1. Inside your app's directory, create dir called 'templatetags'. In that directory, create a .py file (say 'app_extras.py'). Make sure you …</p>
Freely redistributable