Skip to main content

('Django-Jinja (Jinja2) extension and filter for parse markdown text markup.',)

Project description

django-jinja-markdown
==============

django-jinja (Jinja2) extension and filter for parse markdown text markup.


Requirements
============

Python-Markdown - http://packages.python.org/Markdown/


Installation
=============

Install django-jinja-markdown:

pip install django-jinja-markdown

Add 'django_jinja_markdown' to INSTALLED_APPS.

To be able to use `markdown` extension you should add it to TEMPLATES extensions list:

TEMPLATES = [
{
'BACKEND': 'django_jinja.backend.Jinja2',
'OPTIONS': {
'extensions': [
'django_jinja_markdown.extensions.MarkdownExtension',
],
}
},
]

Basic Use
=========

Example of using filter in template:

{{ content|markdown() }}

Or with additional settings:

{{ content|markdown(extensions=['nl2br',]) }}

Example of using extension:

{% markdown %}
Text which will get converted with Markdown.
{% endmarkdown %}

License
=======

This software is licensed under The MIT License (MIT). For more information, read the file LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-jinja-markdown-1.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

django_jinja_markdown-1.0-py2.py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page