1 2 3 4 5 6 7 8 | from django.conf import settings
import re
def disemvowel_profanity(value):
for w in settings.PROFANITIES_LIST:
if value.find(w)!=-1:
value = value.replace(value, re.sub(r'[AEIOUYaeiouy]', '', value))
return value
|
More like this
- NonceField for disabling autocompletion by johnnoone 3 years, 3 months ago
- CleanCharField by DvD 4 years, 8 months ago
- SMTPConnection with Return-Path by sgb 4 years ago
- pavement file for deploying django projects by bl4th3rsk1t3 3 years ago
- Internet Explorer Redirect Decorator by johnboxall 3 years, 7 months ago
Comments