Django-Jinja (Jinja2) extension and filter to parse markdown text in templates.
Requirements
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. Please see CHANGELOG for more history.
Releasing
Update the version number in pyproject.toml.
Add an entry to the CHANGELOG file.
Tag the commit with the version number: e.g. 1.21.
Push the commit and tag to the GitHub repo.
Create a new GitHub release, selecting the tag you just pushed to specify the commit. Hit Publish.
GitHub will build and release the package to PyPI. Monitor the progress via the Actions tab.
Metadata
Release files for django-jinja-markdown 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_jinja_markdown-1.2.tar.gz | 5.4 kB | Without provenance | Details for django_jinja_markdown-1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_jinja_markdown-1.2-py3-none-any.whl | Python 3 | none | any | Details for django_jinja_markdown-1.2-py3-none-any.whl |
Total release size: 13.4 kB
Release files / django_jinja_markdown-1.2.tar.gz
| Download URL | django_jinja_markdown-1.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f109ce81e3655c43a4df0e482f3de839e18f96fecaf7032c415a49a15fde13c4
|
|
BLAKE2b-256 checksum How to use checksums |
6aba8bc33dfd8644c00262d17e4091561e627feac540b73de3221e9152701974
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Release files / django_jinja_markdown-1.2-py3-none-any.whl
| Download URL | django_jinja_markdown-1.2-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58cb4f0f87c7ef216865ff81df209a2aec8afb28451ee5c4aba3a0962da56f88
|
|
BLAKE2b-256 checksum How to use checksums |
45dc0449a46eeff79c08e78c8ed8597335c98930d16fa256e6598602a05955b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Security for django-jinja-markdown 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.