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 2 years, 11 months ago
- CleanCharField by DvD 4 years, 4 months ago
- Internet Explorer Redirect Decorator by johnboxall 3 years, 3 months ago
- pavement file for deploying django projects by bl4th3rsk1t3 2 years, 8 months ago
- Profanity Check by menendez 2 years, 6 months ago
Comments