djangosnippets.org: Latest snippets posted by djypsyhttps://djangosnippets.org/users/djypsy/2007-08-08T08:29:59.017294-05:00djypsyRevisiting Pygments and Markdown
2007-08-08T08:29:59.017294-05:00djypsyhttps://djangosnippets.org/snippets/360/<p>A variation on a theme, inspired by <a href="http://www.djangosnippets.org/snippets/39/">snippet 39</a> and <a href="http://www.djangosnippets.org/snippets/119/">snippet 119</a>. The
intent is to provide a more generic and simple mechanism for combining
<a href="http://www.freewisdom.org/projects/python-markdown/Installation">Markdown</a> with <a href="http://pygments.org/">Pygments</a>. Common scenarios could include blogging or commenting. Snippet 119 seemed too specific and perhaps not as
efficient, needing to process …</p>
Freely redistributableUsing descriptors for lazy attribute caching
2007-08-05T12:46:35.785400-05:00djypsyhttps://djangosnippets.org/snippets/356/<p>Python's <a href="http://users.rcn.com/python/download/Descriptor.htm">descriptor</a> protocol can seem a bit esoteric at first; however, it can
be invaluable in handling everyday idioms and patterns - something that the
Django framework authors have taken advantage of in numerous occasions
(e.g.: <a href="http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/middleware.py">auth middleware</a>).</p>
<p>One such idiom I see and use often and would like …</p>
Freely redistributable