šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

django-profanity-check

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-profanity-check

A Django template filter that wraps around profanity-check

0.1.0
PyPI
Maintainers
1

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 profanity to your INSTALLED_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.

Keywords

Django

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts