comparison antispam/__init__.py @ 581:ee87ea74d46b

For Django 1.4, rearranged project structure for new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 17:10:48 -0500
parents gpp/antispam/__init__.py@2c2df8545112
children 988782c6ce6c
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 import datetime
2
3 from django.contrib.auth import views as auth_views
4
5 from antispam.decorators import rate_limit
6
7 SPAM_PHRASE_KEY = "antispam.spam_phrases"
8 BUSTED_MESSAGE = ("Your post has tripped our spam filter. Your account has "
9 "been suspended pending a review of your post. If this was a mistake "
10 "then we apologize; your account will be restored shortly.")
11
12 # Install rate limiting on auth login
13 auth_views.login = rate_limit(lockout=datetime.timedelta(minutes=2))(auth_views.login)