('Django-Jinja (Jinja2) extension and filter for parse markdown text markup.',)
Project description
Django-Jinja (Jinja2) extension and filter to parse markdown text in templates.
Requirements
Django 1.8 or 1.9
Installation
Install django-jinja-markdown:
pip install django-jinja-markdown
Add django_jinja_markdown to INSTALLED_APPS.
To be able to use the {% markdown %} tag you should add the Jinja extension to your django_jinja TEMPLATES extensions list:
TEMPLATES = [
{
'BACKEND': 'django_jinja.backend.Jinja2',
'OPTIONS': {
'extensions': [
'django_jinja_markdown.extensions.MarkdownExtension',
],
}
},
]
Basic Use
Examples of using filter in template:
{{ content|markdown }}
{{ markdown('this is **bold**') }}
Or with additional settings:
{{ content|markdown(extensions=['nl2br',]) }}
{{ markdown(content, 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.
History
Forked in 2016 from the jingo-markdown project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-jinja-markdown-1.0.1.tar.gz
.
File metadata
- Download URL: django-jinja-markdown-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d41db694bbf3085b026df227428427b859478a2846b55088429e3ccc7115c0c5 |
|
MD5 | d3c2a04cbeb6c3b58ac8fb38bd0be90f |
|
BLAKE2b-256 | a496b84dbfac36d9a0e46e49b9f860ec46969c6a9de3d745d2fba78cad5656da |
File details
Details for the file django_jinja_markdown-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_jinja_markdown-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 233dcde5d6895416f5613e4ca030e88f18a163e4b676e7aa815d191754f53085 |
|
MD5 | dea3bde42f40fb0cd091f6cffaca31ba |
|
BLAKE2b-256 | f2ebea045478d0712ad2952f56876d3a92066b76aa9e6ea0b1e7ccb04f656906 |