Metadata-Version: 2.1
Name: django-markup
Version: 1.3
Summary: A generic Django application to convert text with specific markup to html.
Home-page: http://github.com/bartTC/django-markup/
Author: Martin Mahner
Author-email: martin@mahner.org
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Django
Provides-Extra: all-filter-dependencies
Requires-Dist: django (>=1.4)
Requires-Dist: six
Provides-Extra: all-filter-dependencies
Requires-Dist: textile (>=2.3.16); extra == 'all-filter-dependencies'
Requires-Dist: smartypants (>=2.0.0); extra == 'all-filter-dependencies'
Requires-Dist: docutils (>=0.14); extra == 'all-filter-dependencies'
Requires-Dist: pygments (>=2.2.0); extra == 'all-filter-dependencies'
Requires-Dist: markdown (>=2.6.9); extra == 'all-filter-dependencies'
Requires-Dist: python-creole (>=1.3.1); extra == 'all-filter-dependencies'
Requires-Dist: pygments (>=2.2.0); extra == 'all-filter-dependencies'

.. image:: https://travis-ci.org/bartTC/django-markup.svg?branch=master
    :target: https://travis-ci.org/bartTC/django-markup

.. image:: https://codecov.io/github/bartTC/django-markup/coverage.svg?branch=master
    :target: https://codecov.io/github/bartTC/django-markup?branch=master

=============
django-markup
=============

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 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.3 (2018-09-07):
------------------

- Python 3.6 and 3.7 compatibility and tests.
- Django 2.0 and 2.1 compatibility and tests.
- The package setup script now provides the ability to install all filter
  dependencies automatically. See the installation Readme for details.

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`_.

.. _WikiCreole library: http://devel.sheep.art.pl/creole/
.. _Issue 14: https://github.com/bartTC/django-markup/issues/14


