Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bartTC/django-markup
Convert text markup to html. Markdown, rST, Textile etc.
https://github.com/bartTC/django-markup
Last synced: 24 days ago
JSON representation
Convert text markup to html. Markdown, rST, Textile etc.
- Host: GitHub
- URL: https://github.com/bartTC/django-markup
- Owner: bartTC
- License: bsd-3-clause
- Created: 2009-05-31T17:31:16.000Z (over 15 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T07:39:40.000Z (4 months ago)
- Last Synced: 2024-11-06T17:58:17.024Z (about 1 month ago)
- Language: Python
- Homepage: https://django-markup.readthedocs.io/
- Size: 297 KB
- Stars: 155
- Watchers: 11
- Forks: 47
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - django-markup - Convert text markup to html. Markdown, rST, Textile etc. (Python)
README
.. image:: https://img.shields.io/pypi/v/django-markup.svg
:target: https://pypi.org/project/django-markup/.. image:: https://github.com/bartTC/django-markup/actions/workflows/push.yml/badge.svg?branch=main
:target: https://github.com/bartTC/django-markup/actions----
📖 Full documentation on https://django-markup.readthedocs.io/en/latest/
=============
django-markup
=============This app is a generic way to provide filters that convert text into html.
Compatibility Matrix:
============================== === === ==== ==== ====
Py/Dj 3.8 3.9 3.10 3.11 3.12
========= === === ==== ==== ====
3.2 (LTS) ✓ ✓ ✓ ✓ ✓
4.0 ✓ ✓ ✓ ✓ ✓
4.1 ✓ ✓ ✓ ✓ ✓
4.2 (LTS) ✓ ✓ ✓ ✓ ✓
5.0 — — ✓ ✓ ✓
========= === === ==== ==== ====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 --dev
$ pipenv run testYou can also test against a variation of Django and Python versions
using tox::$ tox