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