Changeset 3784
- Timestamp:
- 09/21/06 21:48:19 (2 years ago)
- Files:
-
- django/trunk/django/conf/global_settings.py (modified) (1 diff)
- django/trunk/django/core/validators.py (modified) (1 diff)
- django/trunk/docs/settings.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/conf/global_settings.py
r3745 r3784 273 273 COMMENTS_ALLOW_PROFANITIES = False 274 274 275 # The profanities that will trigger a validation error in the 276 # 'hasNoProfanities' validator. All of these should be in lower-case. 277 PROFANITIES_LIST = ['asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit'] 278 275 279 # The group ID that designates which users are banned. 276 280 # Set to None if you're not using it. django/trunk/django/core/validators.py
r3634 r3784 228 228 Watch your mouth! The words "f--k" and "s--t" are not allowed here. 229 229 """ 230 bad_words = ['asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit'] # all in lower case231 230 field_data = field_data.lower() # normalize 232 words_seen = [w for w in bad_wordsif field_data.find(w) > -1]231 words_seen = [w for w in settings.PROFANITIES_LIST if field_data.find(w) > -1] 233 232 if words_seen: 234 233 from django.utils.text import get_text_list django/trunk/docs/settings.txt
r3706 r3784 597 597 See also ``APPEND_SLASH``. 598 598 599 PROFANITIES_LIST 600 ---------------- 601 602 A list of profanities that will trigger a validation error when the 603 ``hasNoProfanities`` validator is called. 604 599 605 ROOT_URLCONF 600 606 ------------
