A Django template filter that wraps around profanity-check
Project description
django-profanity-check
A Django template filter that wraps around profanity-check.
Note: numpy
, scipy
, and scikit-learn
are all dependencies of profanity-check
.
Usage
-
Install with
pip
.pip install django-profanity-check
-
Add
profanity
to yourINSTALLED_APPS
.# settings.py INSTALLED_APPS = [ ..., 'profanity', ...]
-
Use it in a template!
{# ... #} {% load profanity %} {# ... #} {% with sentence='Hey, fuck you!' %} {{ sentence | censor }} {# Will result in: 'Hey, **** you!' #} {% endwith %}
Todo
- Allow custom replacement characters
- Allow custom replacement character length
- Template tests
Credits
Victor Zhou's profanity-check Python package does all the heavy lifting.
Inspired by django-profanity-filter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-profanity-check-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9565bd3b036358b9ed6768bf1725a945ca5434e020f5c10c8ebce05cb70dc0a5 |
|
MD5 | 4c6fbb50c987c98726e53db11fc96ebc |
|
BLAKE2b-256 | f0c3539c3d17d4d3f268003cb9599051491f347b26278ea1900543e71a5e2d88 |
Close
Hashes for django_profanity_check-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32deae6f3cd97e010c06c81ad8e850e841a92ec0484d0918acbbb72f104035ff |
|
MD5 | 06cce1b530731b81542db0e86dbc4b01 |
|
BLAKE2b-256 | c1c433c5dce10d9b48ec9a71e1fd92247c935af5036b236fd9670f688e4d6c9d |