Skip to content

Commit

Permalink
Switch to recaptcha.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Sep 15, 2014
1 parent a0bacb5 commit cdaeffb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cab/comments/forms.py
@@ -1,14 +1,14 @@
from django import forms
from django.contrib.comments.forms import CommentForm
from captcha.fields import CaptchaField
from captcha.fields import ReCaptchaField


class CabCommentForm(CommentForm):
your_name = forms.CharField(label='Your Name', required=False,
widget=forms.TextInput(attrs={
'autocomplete': 'off',
}))
captcha = CaptchaField()
captcha = ReCaptchaField(attrs={'theme': 'clean'})

def clean(self):
if self.cleaned_data.get('your_name'):
Expand Down
4 changes: 2 additions & 2 deletions cab/forms.py
Expand Up @@ -2,7 +2,7 @@
from django.contrib import admin

from haystack.forms import SearchForm
from captcha.fields import CaptchaField
from captcha.fields import ReCaptchaField

from cab.models import Language, Snippet, SnippetFlag, VERSIONS

Expand Down Expand Up @@ -78,4 +78,4 @@ def search(self):


class RegisterForm(RegistrationFormUniqueEmail):
captcha = CaptchaField()
captcha = ReCaptchaField(attrs={'theme': 'clean'})
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -125,7 +125,7 @@ def find_package_data(where='.', package='',
'django-registration==1.0',
'django-taggit==0.10',
'django-comments-spamfighter>=0.4',
'django-simple-captcha>=0.4.0',
'django-recaptcha>=1.0',
'django-ratelimit-backend==0.6.2',
]

Expand Down

0 comments on commit cdaeffb

Please sign in to comment.