add django-user-accounts
This commit is contained in:
@ -69,6 +69,8 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.sites',
|
||||
'account',
|
||||
'lazysignup',
|
||||
'dashboard',
|
||||
]
|
||||
@ -82,6 +84,8 @@ MIDDLEWARE = [
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
"account.middleware.LocaleMiddleware",
|
||||
"account.middleware.TimezoneMiddleware",
|
||||
'procat2.middleware.SetApplicationName',
|
||||
]
|
||||
|
||||
@ -98,6 +102,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
"account.context_processors.account",
|
||||
],
|
||||
},
|
||||
},
|
||||
@ -144,5 +149,10 @@ STATIC_URL = '/static/'
|
||||
LOGIN_REDIRECT_URL = reverse_lazy('home')
|
||||
LOGOUT_REDIRECT_URL = reverse_lazy('home')
|
||||
|
||||
# django-user-accounts
|
||||
SITE_ID = 1
|
||||
ACCOUNT_EMAIL_UNIQUE = True
|
||||
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = True
|
||||
|
||||
# bring in ansible-defined settings
|
||||
from .settings_ansible import *
|
||||
|
||||
@ -27,7 +27,7 @@ urlpatterns = [
|
||||
path('', dashboard, name='home'),
|
||||
path('dashboard', dashboard, name='dashboard'),
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
path("account/", include("account.urls")),
|
||||
path('convert/', convert, { 'form_class': UserCreationForm }, name='lazysignup_convert'),
|
||||
path('convert/done/', lazy_convert_done, name='lazysignup_convert_done'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user