Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A generic Django application to convert text with specific markup to html.

Project Description

django-markup

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

The documentation is available at http://readthedocs.org/docs/django-markup/en/latest/

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 requirements of those filters are not installed by default! If you want to use all of the filters right away, you can install their latest packages with:

pip install textile smartypants docutils markdown python-creole

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 simply run python setup.py test which will invoke a Tox collection testing against various Python and Django versions.

For a specific local installation run python runtests.py.

Changelog

v1.2 (2017-03-18):

  • Django 1.10 compatibility and tests.
  • Updated all filter dependencies. most notably SmartyPants to v2.0 which changed it’s API, so your project dependencies need to update it as well.

v1.1 (2016-05-02):

  • The Markdown filter has the safe_mode option enabled by default.
  • The RestructuredText filter has the file and raw content inclusion disabled by default.

v1.0 (2016-01-02):

  • Removed some 5 year old dust
  • Django 1.8+ compatible
  • Tests

Backwards incompatible changes:

  • Removed Pygments highlighting in the Markdown and RestructuredText filter.
  • Removed CreoleParser library in favor of a pypi package.
  • Removed Lightbox filter.
  • The RestructuredText filter now renders level 1 and 2 headers. See Github Issue 14 for details and a backwards compatible workaround.

v0.4 (2011-06-01):

  • Added a widont filter
  • MarkupField is South compatible.
  • Tested with Django 1.3

v0.3 (2009-07-29):

django-markup now ships with a builtin creole parser. Advantage is, that the recently used Creoleparser library needs the Genshi lib, which needs a c-compiler and so on. The builtin creole parser is a pure python library without any dependencies and follows the wikicreole.org specifications. django-markup uses the WikiCreole library.

Release History

Release History

This version
History Node

1.2

History Node

1.1

History Node

1.0

History Node

1.0a1

History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-markup-1.2.tar.gz (22.0 kB) Copy SHA256 Checksum SHA256 Source Mar 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting