Skip to main content

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

  1. Install with pip.

    pip install django-profanity-check
    
  2. Add profanity to your INSTALLED_APPS.

    # settings.py
    
    INSTALLED_APPS = [ ..., 'profanity', ...]
    
  3. 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.

Metadata

Release files for django-profanity-check 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-profanity-check 0.1.0
File Size Uploaded
django-profanity-check-0.1.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-profanity-check 0.1.0
File Interpreter ABI Platform
django_profanity_check-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / django-profanity-check-0.1.0.tar.gz

Download URL django-profanity-check-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9565bd3b036358b9ed6768bf1725a945ca5434e020f5c10c8ebce05cb70dc0a5
BLAKE2b-256 checksum
How to use checksums
f0c3539c3d17d4d3f268003cb9599051491f347b26278ea1900543e71a5e2d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.15 CPython/3.7.3 Darwin/18.5.0

Release files / django_profanity_check-0.1.0-py3-none-any.whl

Download URL django_profanity_check-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32deae6f3cd97e010c06c81ad8e850e841a92ec0484d0918acbbb72f104035ff
BLAKE2b-256 checksum
How to use checksums
c1c433c5dce10d9b48ec9a71e1fd92247c935af5036b236fd9670f688e4d6c9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.15 CPython/3.7.3 Darwin/18.5.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page