djangosnippets.org: Latest snippets posted by ChipX86https://djangosnippets.org/users/ChipX86/2007-08-05T04:40:10.378557-05:00ChipX86Never cache a group of URLs
2007-08-05T04:40:10.378557-05:00ChipX86https://djangosnippets.org/snippets/355/<p>This is a special URL patterns replacement that prevents caching of any URL listed within it. We needed this in Review Board to prevent the JSON API function results from being cached in Internet Explorer.</p>
Freely redistributableE-mail quoting filters and tags
2007-06-10T23:08:24.401014-05:00ChipX86https://djangosnippets.org/snippets/277/<p>Ttemplates and filters for quoting e-mails in templates.</p>
<p>The <code>quoted_email</code> tag takes a template, renders it and quotes the result.</p>
<p>The <code>quote_text</code> filter puts one or more levels of quotes around the passed text.</p>
Freely redistributableHumanize lists of strings in templates
2007-06-10T22:49:16.527746-05:00ChipX86https://djangosnippets.org/snippets/276/<p>A simple template filter for taking a list and humanizing it, converting:</p>
<p><code>["foo", "bar"]</code> to <code>"foo and bar"</code></p>
<p><code>["foo", "bar", "baz"]</code> to <code>"foo, bar and baz"</code></p>
<p><code>["foo", "bar", "baz", "42"]</code> to <code>"foo, bar, baz and 42"</code></p>
Freely redistributable