feat: add signup form

This commit is contained in:
2026-03-10 14:15:31 +01:00
parent 1df9fe960a
commit 13df010470
15 changed files with 278 additions and 69 deletions

View File

@@ -49,6 +49,8 @@ INSTALLED_APPS = [
"allauth",
"allauth.account",
"allauth.socialaccount",
"tailwind",
"theme",
]
MIDDLEWARE = [
@@ -61,6 +63,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
"allauth.account.middleware.AccountMiddleware",
"django.middleware.locale.LocaleMiddleware",
]
ROOT_URLCONF = "kursy.urls"
@@ -90,6 +93,18 @@ AUTHENTICATION_BACKENDS = [
"allauth.account.auth_backends.AuthenticationBackend",
]
ACCOUNT_SIGNUP_FIELDS = [
"first_name*",
"last_name*",
"email*",
"password1*",
"password2*",
]
ACCOUNT_SIGNUP_FORM_CLASS = "kursy.forms.SignUpForm"
ACCOUNT_LOGIN_METHODS = ["email", "username"]
WSGI_APPLICATION = "kursy.wsgi.application"
@@ -126,7 +141,7 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/6.0/topics/i18n/
LANGUAGE_CODE = "en-us"
LANGUAGE_CODE = "pl"
TIME_ZONE = "UTC"
@@ -134,6 +149,11 @@ USE_I18N = True
USE_TZ = True
LANGUAGES = [
("pl", "Polski"),
("en", "English"),
]
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/6.0/howto/static-files/
@@ -201,3 +221,5 @@ WAGTAILDOCS_EXTENSIONS = [
"xlsx",
"zip",
]
TAILWIND_APP_NAME = "theme"

View File

@@ -4,7 +4,7 @@ from .base import *
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-0(k&l$e$c)(9g4h$6@7t8&p$)hkv4ev_8oyqwjqtqddykrbx^j"
SECRET_KEY = "django-insecure-ik$z5b@u(6*35)7_#xejlfezm#kg9+2fxotuz-zwlk^bv7^#32"
# SECURITY WARNING: define the correct hosts in production!
ALLOWED_HOSTS = ["*"]