Skip to content
Convert text markup to html. Markdown, rST, Textile etc.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
django_markup Minor cleanup Mar 16, 2019
docs
.gitignore
.python-version
.travis.yml Added pipenv. Use setup.cfg Mar 15, 2019
CHANGELOG.rst
LICENSE
MANIFEST.in
Pipfile
Pipfile.lock Markdown's safe_mode is deprecated. Replaced with bleach. Mar 15, 2019
README.rst Updated badges Mar 16, 2019
runtests.py Added pipenv. Use setup.cfg Mar 15, 2019
setup.cfg Minor cleanup Mar 16, 2019
setup.py
tox.ini Added pipenv. Use setup.cfg Mar 15, 2019

README.rst

django-markup

https://travis-ci.org/bartTC/django-markup.svg?branch=master https://api.codacy.com/project/badge/Coverage/59e4d38171644acaa13731f08f83ec10 https://api.codacy.com/project/badge/Grade/59e4d38171644acaa13731f08f83ec10

This app is a generic way to provide filters that convert text into html.

The documentation is available at https://docs.elephant.house/django-markup/

Quickstart

Download and install the package from the python package index (pypi):

$ pip install django-markup

Note that django-markup ships with some filters ready to use, but the more complex packages such as Markdown or ReStructuredText are not part of the code. Please refer the docs which packages are used for the built-in filter.

An alternative is to install django-markup with all filter dependencies right away. Do so with:

$ pip install django-markup[all_filter_dependencies]

Then add it to the INSTALLED_APPS list:

INSTALLED_APPS = (
    ...
    'django_markup',
)

Use it in the template:

{% load markup_tags %}
{{ the_text|apply_markup:"markdown" }}

Or in Python code:

from django_markup.markup import formatter
formatter('Some *Markdown* text.', filter_name='markdown')

Testsuite

To run the testsuite install the project with pipenv and run it:

% pipenv install
$ pipenv run ./runtests.py

You can also test against a variation of Django and Python versions using tox:

$ tox
You can’t perform that action at this time.