djangosnippets.org: Latest snippets tagged with 're'https://djangosnippets.org/tags/re/2009-09-04T15:16:30.983323-05:00Template filter to convert timecodes into links
2009-09-04T15:16:30.983323-05:00justin_hhttps://djangosnippets.org/snippets/1717/<p>This template filter, "jumptime" will find any timecodes in a chunk of text and convert them to links that can be used to jump a video player to that point. E.g., If there is the string "3:05", it will be converted into a link that can be used to jump …</p>
Freely redistributableAdd rel=lightbox to all image-links
2008-01-16T11:42:20.081934-06:00bartTChttps://djangosnippets.org/snippets/548/<p>Add the attribute "rel='lightbox'" to all Links, if the target is an image.</p>
<p><code><a href="/path/to/image.jpg">Image</a></code></p>
<p>becomes</p>
<p><code><a rel="lightbox" href="/path/to/image.jpg">Image</a></code></p>
<p>Works for JPG, GIF and PNG Files.</p>
Freely redistributableRegular Expression Dictionary
2007-07-11T23:10:16.097087-05:00skitchhttps://djangosnippets.org/snippets/309/<p>Cute little dictionary-like object that stores keys as regexs and looks up items using regex matches. It actually came in handy for a project where keys were regexes on URLs.</p>
Freely redistributable