comparison gpp/antispam/__init__.py @ 472:7c3816d76c6c

Implement rate limiting on registration and login for #224.
author Brian Neal <bgneal@gmail.com>
date Thu, 25 Aug 2011 02:23:55 +0000
parents 8c1832b9d815
children 2c2df8545112
comparison
equal deleted inserted replaced
471:d83296cac940 472:7c3816d76c6c
1 from django.contrib.auth import views as auth_views
2
3 from antispam.decorators import rate_limit
4
1 SPAM_PHRASE_KEY = "antispam.spam_phrases" 5 SPAM_PHRASE_KEY = "antispam.spam_phrases"
2 BUSTED_MESSAGE = ("Your post has tripped our spam filter. Your account has " 6 BUSTED_MESSAGE = ("Your post has tripped our spam filter. Your account has "
3 "been suspended pending a review of your post. If this was a mistake " 7 "been suspended pending a review of your post. If this was a mistake "
4 "then we apologize; your account will be restored shortly.") 8 "then we apologize; your account will be restored shortly.")
9
10 # Install rate limiting on auth login
11 auth_views.login = rate_limit()(auth_views.login)