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 %}


  • [ ] Allow custom replacement characters
  • [ ] Allow custom replacement character length
  • [ ] Template tests


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

Inspired by django-profanity-filter.

Project details

Release history Release notifications

This version


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 hashes
Filename, size django-profanity-check-0.1.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page