diff gpp/accounts/views.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 69d0306a6fe7
children 886cc99e8406
line wrap: on
line diff
--- a/gpp/accounts/views.py	Wed Aug 17 02:02:20 2011 +0000
+++ b/gpp/accounts/views.py	Thu Aug 25 02:23:55 2011 +0000
@@ -13,10 +13,12 @@
 from accounts.models import PendingUser
 from accounts.forms import RegisterForm
 from accounts import create_new_user
+from antispam.decorators import rate_limit
 
 
 #######################################################################
 
+@rate_limit(count=10, interval=datetime.timedelta(minutes=1))
 def register(request):
     if request.user.is_authenticated():
         return HttpResponseRedirect(settings.LOGIN_REDIRECT_URL)