Commits

Nathaniel Tucker committed 8a5d3d2

Add ModelForm

Comments (0)

Files changed (1)

recaptcha_form/forms.py

                                    label=_('Are you human?') )
         super(RecaptchaForm, self).__init__(*args, **kwargs)
 
+class RecaptchaModelForm(RecaptchaBaseForm, forms.ModelForm):
+    '''
+    Inheriting from this form gives you a reCAPTCHA field at the bottom.
+    '''
+    def __init__(self, *args, **kwargs):
+        self.base_fields['captcha'] = RecaptchaFieldPlaceholder(
+                                   label=_('Are you human?') )
+        super(RecaptchaForm, self).__init__(*args, **kwargs)
+