SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 6297b20c authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add ReCaptcha to petition sign form

parent a6c8a3e6
No related branches found
No related tags found
No related merge requests found
from django import forms from django import forms
from captcha.fields import ReCaptchaField
from .models import PetitionSignatory from .models import PetitionSignatory
class SignPetitionForm(forms.ModelForm): class SignPetitionForm(forms.ModelForm):
captcha = ReCaptchaField(attrs={'theme': 'clean'}, label='*Please verify to continue:')
class Meta: class Meta:
model = PetitionSignatory model = PetitionSignatory
fields = ['title', 'first_name', 'last_name', fields = ['title', 'first_name', 'last_name',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment