djangosnippets.org: Latest snippets posted by catellarhttps://djangosnippets.org/users/catellar/2011-08-24T17:39:38.890221-05:00catellardatemate
2011-08-24T17:39:38.890221-05:00catellarhttps://djangosnippets.org/snippets/2530/<p>This wil format the date to today at 1:03 pm , yesterday at 9:13 pm, 22 August at 10:08 pm</p>
Freely redistributablemadslug
2011-08-24T17:36:23.772439-05:00catellarhttps://djangosnippets.org/snippets/2529/<p>this will turn</p>
<p>ikfjji34 iojwe# eijdf#@$iojdfg 234oijdfg</p>
<p>into</p>
<p>ikfjji_iojwe_eijdfiojdfg_oijdfg</p>
Freely redistributablecreate_c
2011-08-24T15:03:53.269601-05:00catellarhttps://djangosnippets.org/snippets/2527/<p>Instead of creating a dictionary on every view everytime you could do this</p>
<p>and just call it like c = create_c(request)</p>
Freely redistributableRegistration with confirmation email
2011-08-24T14:58:41.111657-05:00catellarhttps://djangosnippets.org/snippets/2526/<p>This registers a users taking data from a submitted form, sends a confirmation email, activates the account when the confirmation link is clicked and logs the user in</p>
Freely redistributableultralize
2011-08-24T14:54:31.949032-05:00catellarhttps://djangosnippets.org/snippets/2525/<p>This is a function based on django's urlize modified to show different media based on their url. It supports images, links, mp3/ogg links, youtube videos, vimeo videos and dailymotion videos.</p>
<p>I added a switch called mini to have two modes to show things in different places. When mini is activated …</p>
Freely redistributable