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
profanityto 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-profanity-check-0.1.0.tar.gz.
File metadata
- Download URL: django-profanity-check-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.15 CPython/3.7.3 Darwin/18.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9565bd3b036358b9ed6768bf1725a945ca5434e020f5c10c8ebce05cb70dc0a5
|
|
| MD5 |
4c6fbb50c987c98726e53db11fc96ebc
|
|
| BLAKE2b-256 |
f0c3539c3d17d4d3f268003cb9599051491f347b26278ea1900543e71a5e2d88
|
File details
Details for the file django_profanity_check-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_profanity_check-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.15 CPython/3.7.3 Darwin/18.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32deae6f3cd97e010c06c81ad8e850e841a92ec0484d0918acbbb72f104035ff
|
|
| MD5 |
06cce1b530731b81542db0e86dbc4b01
|
|
| BLAKE2b-256 |
c1c433c5dce10d9b48ec9a71e1fd92247c935af5036b236fd9670f688e4d6c9d
|