Login

Snippets by catellar

Snippet List

datemate

This wil format the date to today at 1:03 pm , yesterday at 9:13 pm, 22 August at 10:08 pm

  • datetime
  • date
  • date-format
Read More

madslug

this will turn ikfjji34 iojwe# eijdf#@$iojdfg 234oijdfg into ikfjji_iojwe_eijdfiojdfg_oijdfg

  • text
  • slug
Read More

create_c

Instead of creating a dictionary on every view everytime you could do this and just call it like c = create_c(request)

  • templates
  • request
  • data
  • csrf
Read More

Registration with confirmation email

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

  • registration
  • email
  • register
  • confirmation
Read More

ultralize

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. I added a switch called mini to have two modes to show things in different places. When mini is activated it will only parse the first url provided and discard the rest as well as limiting the height.

  • html
  • youtube
  • urlize
  • parser
  • vimeo
  • dailymotion
  • url-to-image
  • url-to-video
  • urlze
Read More

catellar has posted 5 snippets.