Задать вопрос

Тел: +7 965 3737 888

451

Просмотров

0

Ответов

Profanity Filter Middleware

<p>I wanted a global way to filter profanity w/out having to modify every model, view, or form. While middleware takes overhead, this technique is intended mainly for sites w/few postbacks. Hopefully this snippet will lead to more/better techniques in the comments below.</p>
<p>Usage (settings.py):</p>
MIDDLEWARE_CLASSES = (
    'PROJECT_NAME.FILE_NAME.ProfanityFilterMiddleware',
)

Вопрос полезен? Да0/Нет0
file_5104.py(324.0б)
None