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

Download files

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

Source Distribution

django-profanity-check-0.1.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

django_profanity_check-0.1.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page