Trent Mick: June 2010

django-markdown-deux Django app

  • Project page: http://github.com/trentm/django-markdown-deux
  • on PyPI: http://pypi.python.org/pypi/django-markdown-deux/

django-markdown-deux is a small Django app that provides template tags for using Markdown using the python-markdown2 library. MIT license.

What's with the "deux" in the name?

The obvious name for this project in django-markdown2. However, there already is one! and name confusion doesn't help anybody. Plus, I took French immersion in school for 12 years: might as well put it to use.

Quick Usage

markdown template filter

{% load markdown_deux_tags %}
...
{{ myvar|markdown:"STYLE" }}      {# convert `myvar` to HTML using the "STYLE" style #}
{{ myvar|markdown }}              {# same as `{{ myvar|markdown:"default"}}` #}

markdown template block tag

{% load markdown_deux_tags %}
...
{% markdown STYLE %}        {# can omit "STYLE" to use the "default" style #}
This is some **cool**
[Markdown](http://daringfireball.net/projects/markdown/)
text here.
{% endmarkdown %]

See more usage info, available settings, installation notes, etc. at the github project page. (I mention on Moz planet because Benjamin is, or was, using python-markdown2 and I've heard Mozilla is using more Django these days.)

0 comments

Donating blood in downtown Vancouver

I like to try to donate blood regularly (you're allow to donate every 56 days). It is an easy thing to do to help the system. But really I'm just in it for the free cookies at the end of it. There is no other way I can justify my having an Oreo at 10am. Here is how in downtown Vancouver (where I work):

Some tips: You'll need ID. A driver's licence will do. Don't go at lunch time when it gets much more busy.

0 comments