Created: 2008-10-20 05:08
Updated: 2019-01-17 14:59
License: other



This is a simple app, which supplies a single template tag for markdown markup.


django-markdown2 depends on python-markdown2, which can be found at

Installation and usage

  • Place django_markdown2 somewhere in your PYTHONPATH.

  • Add django_markdown2 to you INSTALLED_APPS.

  • In any template do:

      {% load md2 %}
      {{ variable|markdown }}
  • Or specify additional extensions:

      {% load md2 %}
      {{ variable|markdown:"safe, code-friendly, code-color" }}
  • Also, if you use my recent markdown2-with-blackjack from, then you can pass additional options to code-color extension:

      {% load md2 %}
      {{ variable|markdown:"safe, code-friendly, code-color: noclasses|linenos" }}

    Options from this example switch off css classes and turn on line numbers.


Code for this application available at:

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more