I am trying to understand how it's possible to use http://code.google.com/p/django-simple-captcha/ with django comments. I have done all as described here: http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/
So my forms in custom comment app looks like this:
from django import forms
from django.contrib.comments.forms import CommentForm
from captcha.fields import CaptchaField
class CommentFormWithCaptcha(CommentForm):
captcha = CaptchaField()
def get_comment_model(self):
# Use our custom comment model instead of the built-in one.
return Comment
And my __init__.py
file:
from protected_comments.forms import CommentFormWithCaptcha
def get_form():
return CommentFormWithCaptcha
The captcha field is rendered, but I don't understand how to check if input was valid. E.g. simple-captcha docs said following
if form.is_valid():
human = True
But I don't really understand where I can add this. Is there a method in forms.py I can override?