django-markup


Namedjango-markup JSON
Version 1.8.1 PyPI version JSON
download
home_pagehttps://github.com/bartTC/django-markup
SummaryA generic Django application to convert text with specific markup to html.
upload_time2023-10-07 10:49:05
maintainer
docs_urlhttps://pythonhosted.org/django-markup/
authorMartin Mahner
requires_python>=3.7
licenseMIT
keywords django markup markdown restructuredtext format text
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. 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.7 3.8 3.9 3.10 3.11
========= === === === ==== ====
3.2 (LTS)  ✓   ✓   ✓   ✓    ✓
4.0            ✓   ✓   ✓    ✓
4.1            ✓   ✓   ✓    ✓
4.2 (LTS)      ✓   ✓   ✓    ✓
========= === === === ==== ====

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 test

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

    $ tox


Changelog
=========

v1.8.1 (2023-10-07):
--------------------

- Remove all annotations for "Self". It would require an additional dependency for
  installations on Python <3.11 and that's not worth it.

v1.8 (2023-10-07):
------------------

- Drop support for Python <3.8.
- Added support for Python 3.12 and Django 5.0.
- Type Annotations.

v1.7.2 (2023-05-01):
--------------------

- Fixed a setup.cfg bug that defined the minimal Django version to be v3.7 which does
  not exist. The correct version is 3.2.

v1.7.1 (2023-04-25):
--------------------

- Fixed Python classifiers in setup.cfg.

v1.7 (2023-04-25):
------------------

- Django 4.2 compatibility and tests.
- Python 3.11 compatibility and tests.

v1.6 (2022-08-14):
------------------

- Dropped support for Django <3.2 and Python <3.7.
- Django 3.2 (LTS) compatibility and tests.
- Django 4.0 compatibility and tests.
- Django 4.1 compatibility and tests.
- Python 3.9 compatibility and tests.
- Python 3.10 compatibility and tests.


v1.5 (2020-06-12):
------------------

- Dropped support for Django <=1.11 and Python <=3.5.
- Python 3.8 compatibility and tests.
- Django 3.0 compatibility and tests.
- bleach-whitelist dependency is no longer necessary as tags are now shipped
  with the built-in markdown filter.
- Uses pytest for testing.

v1.4 (2019-03-15):
------------------

- Markdown's safe_mode was deprecated and no longer functional, it's behavior
  was replaced with bleach_.
- Pipfile support for local development and general code cleanup.

.. _bleach: https://github.com/mozilla/bleach

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bartTC/django-markup",
    "name": "django-markup",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/django-markup/",
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "django,markup,markdown,restructuredtext,format,text",
    "author": "Martin Mahner",
    "author_email": "martin@mahner.org",
    "download_url": "https://files.pythonhosted.org/packages/fd/90/4948d445d29c5caac4731ecddbe52b64cc53bc1383193e72954f4bea2fd0/django-markup-1.8.1.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/django-markup.svg\n    :target: https://pypi.org/project/django-markup/\n\n.. image:: https://github.com/bartTC/django-markup/actions/workflows/push.yml/badge.svg?branch=main\n    :target: https://github.com/bartTC/django-markup/actions\n\n----\n\n\ud83d\udcd6 Full documentation on https://django-markup.readthedocs.io/en/latest/\n\n=============\ndjango-markup\n=============\n\nThis app is a generic way to provide filters that convert text into html.\n\nCompatibility Matrix:\n=====================\n\n========= === === === ==== ====\nPy/Dj     3.7 3.8 3.9 3.10 3.11\n========= === === === ==== ====\n3.2 (LTS)  \u2713   \u2713   \u2713   \u2713    \u2713\n4.0            \u2713   \u2713   \u2713    \u2713\n4.1            \u2713   \u2713   \u2713    \u2713\n4.2 (LTS)      \u2713   \u2713   \u2713    \u2713\n========= === === === ==== ====\n\nQuickstart\n==========\n\nDownload and install the package from the python package index (pypi)::\n\n    $ pip install django-markup\n\nNote that `django-markup` ships with some filters ready to use, but the more\ncomplex packages such as Markdown or ReStructuredText are not part of the code.\nPlease refer the docs which packages are used for the built-in filter.\n\nAn alternative is to install django-markup with all filter dependencies\nright away. Do so with::\n\n    $ pip install django-markup[all_filter_dependencies]\n\nThen add it to the ``INSTALLED_APPS`` list::\n\n    INSTALLED_APPS = (\n        ...\n        'django_markup',\n    )\n\nUse it in the template::\n\n    {% load markup_tags %}\n    {{ the_text|apply_markup:\"markdown\" }}\n\nOr in Python code::\n\n    from django_markup.markup import formatter\n    formatter('Some *Markdown* text.', filter_name='markdown')\n\nTestsuite\n=========\n\nTo run the testsuite install the project with pipenv and run it::\n\n    % pipenv install --dev\n    $ pipenv run test\n\nYou can also test against a variation of Django and Python versions\nusing tox::\n\n    $ tox\n\n\nChangelog\n=========\n\nv1.8.1 (2023-10-07):\n--------------------\n\n- Remove all annotations for \"Self\". It would require an additional dependency for\n  installations on Python <3.11 and that's not worth it.\n\nv1.8 (2023-10-07):\n------------------\n\n- Drop support for Python <3.8.\n- Added support for Python 3.12 and Django 5.0.\n- Type Annotations.\n\nv1.7.2 (2023-05-01):\n--------------------\n\n- Fixed a setup.cfg bug that defined the minimal Django version to be v3.7 which does\n  not exist. The correct version is 3.2.\n\nv1.7.1 (2023-04-25):\n--------------------\n\n- Fixed Python classifiers in setup.cfg.\n\nv1.7 (2023-04-25):\n------------------\n\n- Django 4.2 compatibility and tests.\n- Python 3.11 compatibility and tests.\n\nv1.6 (2022-08-14):\n------------------\n\n- Dropped support for Django <3.2 and Python <3.7.\n- Django 3.2 (LTS) compatibility and tests.\n- Django 4.0 compatibility and tests.\n- Django 4.1 compatibility and tests.\n- Python 3.9 compatibility and tests.\n- Python 3.10 compatibility and tests.\n\n\nv1.5 (2020-06-12):\n------------------\n\n- Dropped support for Django <=1.11 and Python <=3.5.\n- Python 3.8 compatibility and tests.\n- Django 3.0 compatibility and tests.\n- bleach-whitelist dependency is no longer necessary as tags are now shipped\n  with the built-in markdown filter.\n- Uses pytest for testing.\n\nv1.4 (2019-03-15):\n------------------\n\n- Markdown's safe_mode was deprecated and no longer functional, it's behavior\n  was replaced with bleach_.\n- Pipfile support for local development and general code cleanup.\n\n.. _bleach: https://github.com/mozilla/bleach\n\nv1.3 (2018-09-07):\n------------------\n\n- Python 3.6 and 3.7 compatibility and tests.\n- Django 2.0 and 2.1 compatibility and tests.\n- The package setup script now provides the ability to install all filter\n  dependencies automatically. See the installation Readme for details.\n\nv1.2 (2017-03-18):\n------------------\n\n- Django 1.10 compatibility and tests.\n- Updated all filter dependencies. most notably SmartyPants to v2.0\n  which changed it's API, so your project dependencies need to update it\n  as well.\n\nv1.1 (2016-05-02):\n------------------\n\n- The Markdown filter has the ``safe_mode`` option enabled by default.\n- The RestructuredText filter has the file and raw content inclusion\n  disabled by default.\n\nv1.0 (2016-01-02):\n------------------\n\n- Removed some 5 year old dust\n- Django 1.8+ compatible\n- Tests\n\nBackwards incompatible changes:\n\n- Removed Pygments highlighting in the Markdown and RestructuredText filter.\n- Removed CreoleParser library in favor of a pypi package.\n- Removed Lightbox filter.\n- The RestructuredText filter now renders level 1 and 2 headers.\n  See Github `Issue 14`_ for details and a backwards compatible workaround.\n\nv0.4 (2011-06-01):\n------------------\n\n- Added a widont filter\n- MarkupField is South compatible.\n- Tested with Django 1.3\n\nv0.3 (2009-07-29):\n------------------\n\ndjango-markup now ships with a builtin creole parser. Advantage is, that\nthe recently used Creoleparser library needs the Genshi lib, which needs\na c-compiler and so on. The builtin creole parser is a pure python library\nwithout any dependencies and follows the wikicreole.org specifications.\ndjango-markup uses the `WikiCreole library`_.\n\n.. _WikiCreole library: http://devel.sheep.art.pl/creole/\n.. _Issue 14: https://github.com/bartTC/django-markup/issues/14\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A generic Django application to convert text with specific markup to html.",
    "version": "1.8.1",
    "project_urls": {
        "Homepage": "https://github.com/bartTC/django-markup"
    },
    "split_keywords": [
        "django",
        "markup",
        "markdown",
        "restructuredtext",
        "format",
        "text"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51f5568fe4afcdf4a4b4fd90f75b23ae8669977e136b03f6038ac46fce4acbb0",
                "md5": "683c1577393dd98b93b52567ce4bafb6",
                "sha256": "bf0dabcfc288eac76b6e501357b02383ff7012b48e4005cab58e3c68b5474e07"
            },
            "downloads": -1,
            "filename": "django_markup-1.8.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "683c1577393dd98b93b52567ce4bafb6",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 18971,
            "upload_time": "2023-10-07T10:49:02",
            "upload_time_iso_8601": "2023-10-07T10:49:02.902354Z",
            "url": "https://files.pythonhosted.org/packages/51/f5/568fe4afcdf4a4b4fd90f75b23ae8669977e136b03f6038ac46fce4acbb0/django_markup-1.8.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd904948d445d29c5caac4731ecddbe52b64cc53bc1383193e72954f4bea2fd0",
                "md5": "8a5e5fc88bf03d2268c5f565ea0d7371",
                "sha256": "04824880a7afbd19e7b3cdaf0005e759f818b2cc4e3b4f1dd97182b7038a72c9"
            },
            "downloads": -1,
            "filename": "django-markup-1.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8a5e5fc88bf03d2268c5f565ea0d7371",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 39201,
            "upload_time": "2023-10-07T10:49:05",
            "upload_time_iso_8601": "2023-10-07T10:49:05.980543Z",
            "url": "https://files.pythonhosted.org/packages/fd/90/4948d445d29c5caac4731ecddbe52b64cc53bc1383193e72954f4bea2fd0/django-markup-1.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-07 10:49:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bartTC",
    "github_project": "django-markup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-markup"
}
        
Elapsed time: 0.13305s