Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marksweb/django-nh3
Django integration with for nh3, Python binding to Ammonia HTML sanitizer Rust crate.
https://github.com/marksweb/django-nh3
bleach django sanitize-html
Last synced: 12 days ago
JSON representation
Django integration with for nh3, Python binding to Ammonia HTML sanitizer Rust crate.
- Host: GitHub
- URL: https://github.com/marksweb/django-nh3
- Owner: marksweb
- License: mit
- Created: 2023-03-01T14:20:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-17T08:27:19.000Z (22 days ago)
- Last Synced: 2024-10-19T11:25:32.402Z (20 days ago)
- Topics: bleach, django, sanitize-html
- Language: Python
- Homepage:
- Size: 83 KB
- Stars: 23
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-django - django-nh3 - Django integration with for nh3 and is an alternative for django-bleach. (Third-Party Packages / General)
README
==========
django-nh3
==========|actions| |pypi| |black| |pre|
Django integration with for nh3, Python binding to Ammonia HTML sanitizer Rust crate.
`nh3 docs`_
Requirements
------------Python 3.10 to 3.13 supported.
Django 3.2 to 5.1 supported.
.. _nh3 docs: https://nh3.readthedocs.io/en/latest/?badge=latest
Contributing
------------The project is in it's infancy, setup because of `bleach becoming deprecated`_.
It is setup with pre-commit to maintain code quality. This includes black for formatting, ruff for linting & checks.
This is much like django, so currently referring to django's own `style docs`_ will be most helpfulTo contribute, fork the repo and clone your fork to your machine. Then setup a virtual environment however you prefer to do this.
Then run the following setup the basics:.. code-block:: bash
python -m pip install pre-commit tox-uv
pre-commit installTox is used to run tests locally and on github. The test requirements are generated using pip-tools via ``requirements/compile.py``.
.. _style docs: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/#python-style
.. _bleach becoming deprecated: https://bluesock.org/~willkg/blog/dev/bleach_6_0_0_deprecation.html.. |actions| image:: https://img.shields.io/github/actions/workflow/status/marksweb/django-nh3/main.yml?branch=main&style=for-the-badge
:target: https://github.com/marksweb/django-nh3/actions?workflow=CI.. |pypi| image:: https://img.shields.io/pypi/v/django-nh3.svg?style=for-the-badge
:target: https://pypi.org/project/django-nh3/.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
:target: https://github.com/psf/black.. |pre| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit