Skip to main content

A Django template filter that wraps around profanity-check

Project description


A Django template filter that wraps around profanity-check.

Note: numpy, scipy, and scikit-learn are all dependencies of profanity-check.


  1. Install with pip.

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

    INSTALLED_APPS = [ ..., 'profanity', ...]
  3. Use it in a template!

    {# ... #}
    {% load profanity %}
    {# ... #}
    {% with sentence='Hey, fuck you!' %}
       {{ sentence | censor }} {# Will result in: 'Hey, **** you!' #}
    {% endwith %}


  • <input type="checkbox" disabled="" /> Allow custom replacement characters
  • <input type="checkbox" disabled="" /> Allow custom replacement character length
  • <input type="checkbox" disabled="" /> Template tests


Victor Zhou's profanity-check Python package does all the heavy lifting.

Inspired by django-profanity-filter.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-profanity-check, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django_profanity_check-0.1.0-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-profanity-check-0.1.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page