Add Django-AllAuth app
This commit is contained in:
parent
ff5f5dd2e4
commit
dac078f7db
3 changed files with 18 additions and 3 deletions
|
|
@ -41,6 +41,9 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'allauth',
|
||||||
|
'allauth.account',
|
||||||
|
'allauth.socialaccount',
|
||||||
'crispy_forms',
|
'crispy_forms',
|
||||||
'photologue_custom',
|
'photologue_custom',
|
||||||
'photologue',
|
'photologue',
|
||||||
|
|
@ -81,6 +84,14 @@ TEMPLATES = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
AUTHENTICATION_BACKENDS = [
|
||||||
|
# Needed to login by username in Django admin, regardless of `allauth`
|
||||||
|
'django.contrib.auth.backends.ModelBackend',
|
||||||
|
|
||||||
|
# `allauth` specific authentication methods, such as login by e-mail
|
||||||
|
'allauth.account.auth_backends.AuthenticationBackend',
|
||||||
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = 'photo21.wsgi.application'
|
WSGI_APPLICATION = 'photo21.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -168,7 +179,11 @@ SESSION_COOKIE_AGE = 60 * 60 * 3
|
||||||
# Use only one Django Sites
|
# Use only one Django Sites
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
# use Bootstrap forms
|
# Allauth configuration
|
||||||
|
ACCOUNT_EMAIL_REQUIRED = True
|
||||||
|
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||||
|
|
||||||
|
# Use Bootstrap forms
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
# Photologue
|
# Photologue
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,7 @@ urlpatterns = [
|
||||||
path('', IndexView.as_view(), name='index'),
|
path('', IndexView.as_view(), name='index'),
|
||||||
path('photologue/', include('photologue_custom.urls')),
|
path('photologue/', include('photologue_custom.urls')),
|
||||||
path('photologue/', include('photologue.urls', namespace='photologue')),
|
path('photologue/', include('photologue.urls', namespace='photologue')),
|
||||||
path('accounts/', include('django.contrib.auth.urls')),
|
path('accounts/', include('allauth.urls')),
|
||||||
path('accounts/', include('accounts.urls')),
|
|
||||||
path('i18n/', include('django.conf.urls.i18n')),
|
path('i18n/', include('django.conf.urls.i18n')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('admin/doc/', include('django.contrib.admindocs.urls')),
|
path('admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@ Django~=2.2.20
|
||||||
django-photologue~=3.13
|
django-photologue~=3.13
|
||||||
django-taggit>=0.24.0
|
django-taggit>=0.24.0
|
||||||
django-crispy-forms~=1.7
|
django-crispy-forms~=1.7
|
||||||
|
django-allauth>=0.44
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue