Login

Snippets by soniiic

Snippet List

Time toggle on mouseover template filter

Shows the timesince to the user and then on mouseover it will display the exact time for allowing the user to see the exact time. Example: shows "about 1 day, 3 hours ago" and then changes on mouseover to read "at 3:05pm on Wednesday 22nd April 2009"

  • date
  • time
  • usability
  • time-toggle
Read More

wordbreak filter

usage: {{ object.content|wordbreak:"10" }} This means if any word is 10 characters or longer, a `­` will be placed every 10 characters. This is to break long words which may break the appearance of a page. The output of this is HTML safe as the content has been conditionally escaped.

  • filter
  • custom-filter
  • wordbreak
  • word-break
  • long-words
Read More

soniiic has posted 2 snippets.