Skip to main content

Markdown template filter for Django.

Project description

Django Markdownify - A Django Markdown filter

Django Markdownify is a template filter to convert Markdown to HTML in Django. Markdown is converted to HTML and sanitized.

Read the full documentation on Read the docs or check out the package on pypi.

Usage

Load the tag inside your template:

{% load markdownify %}

Then you can change markdown to html as follows:

{{ 'text'|markdownify }}

or

{{ somevariable|markdownify }}

Example

{% load markdownify %}
{{'Some *test* [link](#)'|markdownify }}

Is transformed to:

<p>
  Some <em>test</em> <a href="#">link</a>
</p>

Documentation

Read the full documentation on Read the docs.

Credits

This filter is a slightly richer and packaged version of the snippet: using-markdown-django-17.

Project details


Download files

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

Files for django-markdownify, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size django_markdownify-0.9.0-py3-none-any.whl (10.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-markdownify-0.9.0.tar.gz (6.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page