captcha
This commit is contained in:
parent
962f8bc8fb
commit
e6c700c298
3 changed files with 5 additions and 1 deletions
|
|
@ -26,7 +26,8 @@ INSTALLED_APPS = [
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.humanize',
|
||||
'markdownx'
|
||||
'markdownx',
|
||||
'captcha'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@ urlpatterns = [
|
|||
path("code_of_ethics", code_of_ethics, name="code_of_ethics"),
|
||||
path("forum/threads/", forum_threads, name='forum_threads'),
|
||||
path("forum/thread/<thread_id>", thread, name='thread'),
|
||||
path('captcha/', include('captcha.urls')),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from django import forms
|
|||
from django.contrib.auth.forms import UserCreationForm
|
||||
from web.models.custom_user import CustomUser
|
||||
from markdownx.fields import MarkdownxFormField
|
||||
from captcha.fields import CaptchaField
|
||||
|
||||
|
||||
class SignupForm(UserCreationForm):
|
||||
|
|
@ -24,6 +25,7 @@ class SignupForm(UserCreationForm):
|
|||
email_only.widget.attrs.update({'class': 'checkmark'})
|
||||
|
||||
comments = forms.CharField(widget=forms.Textarea, required=False)
|
||||
captcha = CaptchaField()
|
||||
|
||||
class Meta:
|
||||
model = CustomUser
|
||||
|
|
|
|||
Loading…
Reference in a new issue