On 10/12/14 16:34, Amber Grimaldi wrote:
On Tuesday, December 9, 2014 8:20:07 PM UTC-7, gmflanagan wrote:
On 09/12/14 21:51, Amber Grimaldi wrote:
> Hey! I'm trying to use recaptcha with the registration form to
stop bots
> from signing up on the site. I got recaptcha to work using
> django-recaptcha package and it's present in the template but not
sure
> how to actually integrate it into the form because currently you can
> still register without getting the recaptcha verification. Any
> suggestions other than c/p mezzanine's accounts app and customizing?
>
Here's an example using django-simple-captcha:
https://github.com/averagehuman/mezzanine-invites/blob/master/invites/forms.py
<https://github.com/averagehuman/mezzanine-invites/blob/master/invites/forms.py>
I imagine recaptcha would look similar.
The problem with the above is I would have to edit mezzanine's
accounts/forms.py to utilize. Is that what you suggest or am I missing
something?
Sorry, I should have added that you would also need to add this setting:
ACCOUNTS_PROFILE_FORM_CLASS = "<your-project>.forms.ProfileForm"
to your settings file (or similar). ProfileForm in the above example is
a factory function rather than a class, but Mezzanine only expects that
your ACCOUNTS_PROFILE_FORM_CLASS value is callable.
But in any case, no, you certainly don't need to edit any mezzanine
code. This is definitely a solvable problem without forking mezzanine.
If you are still not getting anywhere, perhaps post a minimal setup -
settings + urls + views + forms - and we can try and reproduce.
Gerard
--
You received this message because you are subscribed to the Google Groups "Mezzanine
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.