djangosnippets.org: Latest snippets posted by soniiichttps://djangosnippets.org/users/soniiic/2009-04-22T01:50:26.500974-05:00soniiicTime toggle on mouseover template filter
2009-04-22T01:50:26.500974-05:00soniiichttps://djangosnippets.org/snippets/1458/<p>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"</p>
Freely redistributablewordbreak filter
2009-04-12T02:37:14.715077-05:00soniiichttps://djangosnippets.org/snippets/1432/<p>usage:</p>
<p>{{ object.content|wordbreak:"10" }}</p>
<p>This means if any word is 10 characters or longer, a <code>&shy;</code> will be placed every 10 characters. This is to break long words which may break the appearance of a page.</p>
<p>The output of this is HTML safe as the content has been conditionally escaped.</p>
Freely redistributable