djangosnippets.org: Latest snippets posted by jcasseehttps://djangosnippets.org/users/jcassee/2008-08-14T14:59:52.854072-05:00jcasseeLocalized digits
2008-08-14T14:59:52.854072-05:00jcasseehttps://djangosnippets.org/snippets/980/<p>Arabic and Farsi languages use their own digits. This template filter translates any digits in the supplied unicode string into the correct ones for the language. The previous version used StringIO to parse the string one character at a time. It now uses regular expressions.</p>
<p>I just saw that kcarnold …</p>
Freely redistributableRefreshSessionMiddleware
2008-08-06T08:10:04.550980-05:00jcasseehttps://djangosnippets.org/snippets/945/<p>This middleware refreshes the session before it expires to avoid dropping the session of an active (but read-only) user. By default it refreshes the session after half the expiry time has elapsed.</p>
<p>(This middleware does nothing for browser-length sessions.)</p>
Freely redistributable