djangosnippets.org: Latest snippets posted by jayliewhttps://djangosnippets.org/users/jayliew/2012-09-20T16:37:39.563380-05:00jayliewFilter to add zero-width space to break up long words
2012-09-20T16:37:39.563380-05:00jayliewhttps://djangosnippets.org/snippets/2822/<p>If you have long words (no spaces) that are so long that it's messing up your design, add a 0-width space in the word every X chars.</p>
<p>Usage:</p>
<p>Step 1. Inside your app's directory, create dir called 'templatetags'. In that directory, create a .py file (say 'app_extras.py'). Make sure you …</p>
Freely redistributableQuerying datetime aware objects in your local timezone
2012-05-27T10:18:44.805557-05:00jayliewhttps://djangosnippets.org/snippets/2759/<p>I have a model with a datetime field that I used as a timestamp. I’m in California’s timezone (“America/Los_Angeles”). The data is saved in UTC in MySQL (as confirmed by the ORM). I just want to do a query that looks like this: “give me all the information with day …</p>
Freely redistributable