djangosnippets.org: Latest snippets posted by blinkshttps://djangosnippets.org/users/blinks/2007-11-05T12:21:18.343630-06:00blinksGoogle Analytics Template Tag
2007-11-05T12:21:18.343630-06:00blinkshttps://djangosnippets.org/snippets/457/<p>Use <code>{% urchin "UA-1234567-1" %}</code> to insert the Javascript snippet for a Google Analytics site.</p>
Freely redistributableAn XML-RPC Decorator
2007-03-19T22:43:13.266264-05:00blinkshttps://djangosnippets.org/snippets/120/<p>Drop this package wherever you want, import the decorator, and use it with one argument to decorate any function you want (<code>@xmlrpc('pingback.ping')</code>). That function is now available on your XML-RPC interface, available through this view.</p>
<p>Make sure to provide the view (<code>call_xmlrpc</code>) with a URL so …</p>
Freely redistributableMarkdown and Syntax Highlighting in Django
2007-03-19T22:25:24.364503-05:00blinkshttps://djangosnippets.org/snippets/119/<p>This is a <a href="http://www.djangoproject.com/documentation/templates_python/#extending-the-template-system" title="Extending the template system">Django template tag</a> that renders an arbitrary block of text with Markdown and <a href="http://pygments.org" title="Syntax highlighter">Pygments</a>.</p>
<p>Use Markdown as usual, and when you have a code block to insert, put it inside <code>code</code> tags, with the language as the class:</p>
<p><code><code class='python'>print "Hello, World"</code></code></p>
<p>To use it in …</p>
Freely redistributable