Login

Snippets by ChipX86

Snippet List

Never cache a group of URLs

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.

  • urls
  • cache
  • url
  • patterns
Read More

E-mail quoting filters and tags

Ttemplates and filters for quoting e-mails in templates. The `quoted_email` tag takes a template, renders it and quotes the result. The `quote_text` filter puts one or more levels of quotes around the passed text.

  • filter
  • tag
  • filters
  • email
  • tags
  • quoting
Read More

Humanize lists of strings in templates

A simple template filter for taking a list and humanizing it, converting: `["foo", "bar"]` to `"foo and bar"` `["foo", "bar", "baz"]` to `"foo, bar and baz"` `["foo", "bar", "baz", "42"]` to `"foo, bar, baz and 42"`

  • filter
  • lists
  • filters
  • humanize
Read More

ChipX86 has posted 3 snippets.