add captcha
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
from django import forms
|
||||
from captcha.fields import CaptchaField
|
||||
from .models import Betrieb, Partei, PresidentCandidate, Question
|
||||
|
||||
|
||||
@@ -8,6 +9,7 @@ class BetriebForm(forms.Form):
|
||||
manager = forms.CharField(label='Betriebsleiter', max_length=200)
|
||||
email = forms.EmailField(label='Kontakt Email')
|
||||
business_idea = forms.CharField(label='Idee')
|
||||
captcha = CaptchaField()
|
||||
|
||||
|
||||
class ParteiForm(forms.Form):
|
||||
@@ -16,18 +18,21 @@ class ParteiForm(forms.Form):
|
||||
chef = forms.CharField(label='Parteivorsitzende', max_length=200)
|
||||
email = forms.EmailField(label='Kontakt Email')
|
||||
description = forms.CharField(label='Beschreibung')
|
||||
captcha = CaptchaField()
|
||||
|
||||
|
||||
class PresidentForm(forms.Form):
|
||||
name = forms.CharField(label='Name', max_length=100)
|
||||
email = forms.EmailField(label='Kontakt Email')
|
||||
motivation = forms.CharField(label='Motivation')
|
||||
captcha = CaptchaField()
|
||||
|
||||
|
||||
class QuestionForm(forms.Form):
|
||||
subject = forms.CharField(label='Thema', max_length=100)
|
||||
email = forms.EmailField(label='Kontakt Email')
|
||||
content = forms.CharField(label='Frage')
|
||||
captcha = CaptchaField()
|
||||
|
||||
|
||||
# Create your views here.
|
||||
|
||||
@@ -43,6 +43,7 @@ USE_X_FORWARDED_HOST = True
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'captcha',
|
||||
'datenbank',
|
||||
'meingoethopia',
|
||||
'startpage',
|
||||
|
||||
@@ -27,5 +27,6 @@ urlpatterns += [
|
||||
url(r'^datenbank/', include('datenbank.urls', app_name='datenbank',
|
||||
namespace='datenbank')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^captcha/', include('captcha.urls')),
|
||||
url(r'^', include('startpage.urls', namespace='startpage', app_name='startpage'))
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user