1 2 3 4 5 6 7 8 | from django.conf import settings
class ProfanityFilterMiddleware(object):
def process_request(self, request):
rpd = request.raw_post_data.lower()
for w in settings.PROFANITIES_LIST:
if rpd.find(w)!=-1:
return HttpResponseRedirect("/static/html/rephrase.html")
|
More like this
- Profanity Function (Disemvowel) by areich 3 years, 10 months ago
- Pad integers with leading zeros (template filter) by jcroft 5 years, 4 months ago
- Updated version of StripWhitespaceMiddleware (v1.1) by sleepycal 1 year, 11 months ago
- RandomFileExtensionMiddleware by jezdez 4 years, 11 months ago
- slug_and_slash_to_dash - modified slugify for urls by bradmontgomery 2 years, 8 months ago
Comments