Re: How to invoke hasNoProfanities?
On Sep 12, 5:26 pm, Angel Cruz wrote: > I use the contribs.comments module, and in its clean_comment method: > > if settings.COMMENTS_ALLOW_PROFANITIES == False: > bad_words = [w for w in settings.PROFANITIES_LIST if w in > comment.lower()] > if bad_words: > > > The file is in: > Python25\Lib\site-packages\django\contrib\comment\forms.py > > It came for free, so I never stepped through this code. My mistake, you're right it's used in the comments framework. Brandon, if you're using the built-in comments form, then set COMMENTS_ALLOW_PROFANITIES to False and it should work. -- DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How to invoke hasNoProfanities?
I use the contribs.comments module, and in its clean_comment method: if settings.COMMENTS_ALLOW_PROFANITIES == False: bad_words = [w for w in settings.PROFANITIES_LIST if w in comment.lower()] if bad_words: The file is in: Python25\Lib\site-packages\django\contrib\comment\forms.py It came for free, so I never stepped through this code. On Sat, Sep 12, 2009 at 1:18 AM, Daniel Roseman wrote: > > On Sep 11, 10:40 pm, Brandon wrote: > > Uh, where? I see the definition in settings.py, but I can certainly > > enter any of the words on the profanities list in: > > django.conf.global_settings.py into a text field and it will not throw > > an exception. > > > > I actually think that this is a left-over setting from old code that > has since been removed. The profanities checker was one of the > oldforms validators, which were removed before version 1.0. So the > setting is probably deprecated. > -- > DR. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How to invoke hasNoProfanities?
On Sep 11, 10:40 pm, Brandon wrote: > Uh, where? I see the definition in settings.py, but I can certainly > enter any of the words on the profanities list in: > django.conf.global_settings.py into a text field and it will not throw > an exception. > I actually think that this is a left-over setting from old code that has since been removed. The profanities checker was one of the oldforms validators, which were removed before version 1.0. So the setting is probably deprecated. -- DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How to invoke hasNoProfanities?
Uh, where? I see the definition in settings.py, but I can certainly enter any of the words on the profanities list in: django.conf.global_settings.py into a text field and it will not throw an exception. On Sep 9, 3:55 pm, Chris Withers wrote: > Brandon Taylor wrote: > > I would like to do some obscenity filtering on posts, and I see there > > is a setting: PROFANITIES_LIST > > > But, how to I invoke the hasNoProfanities validator? I searched the > > django source code for this, but the only thing I could find was the > > setting in conf > global_settings.py > > > I'd appreciate some pointers. > > It's in the book, which is free to read online athttp://djangobook.com/ > > cheers, > > Chris > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > -http://www.simplistix.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How to invoke hasNoProfanities?
Brandon Taylor wrote: > I would like to do some obscenity filtering on posts, and I see there > is a setting: PROFANITIES_LIST > > But, how to I invoke the hasNoProfanities validator? I searched the > django source code for this, but the only thing I could find was the > setting in conf > global_settings.py > > I'd appreciate some pointers. It's in the book, which is free to read online at http://djangobook.com/ cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
How to invoke hasNoProfanities?
Hi everyone, I would like to do some obscenity filtering on posts, and I see there is a setting: PROFANITIES_LIST But, how to I invoke the hasNoProfanities validator? I searched the django source code for this, but the only thing I could find was the setting in conf > global_settings.py I'd appreciate some pointers. Thanks, Brandon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---