mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 06:49:37 +02:00
Refactor settings.py to remove unused authentication configurations and clean up middleware
This commit is contained in:
parent
9bc20be70e
commit
f119e6fdc2
1 changed files with 0 additions and 17 deletions
|
@ -47,20 +47,16 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'rest_framework.authtoken',
|
'rest_framework.authtoken',
|
||||||
# 'dj_rest_auth',
|
|
||||||
'allauth',
|
'allauth',
|
||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.headless',
|
'allauth.headless',
|
||||||
# 'dj_rest_auth.registration',
|
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount',
|
||||||
'allauth.socialaccount.providers.facebook',
|
|
||||||
'drf_yasg',
|
'drf_yasg',
|
||||||
'corsheaders',
|
'corsheaders',
|
||||||
'adventures',
|
'adventures',
|
||||||
'worldtravel',
|
'worldtravel',
|
||||||
'users',
|
'users',
|
||||||
'django.contrib.gis',
|
'django.contrib.gis',
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE = (
|
MIDDLEWARE = (
|
||||||
|
@ -84,7 +80,6 @@ CACHES = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# For backwards compatibility for Django 1.8
|
# For backwards compatibility for Django 1.8
|
||||||
MIDDLEWARE_CLASSES = MIDDLEWARE
|
MIDDLEWARE_CLASSES = MIDDLEWARE
|
||||||
|
|
||||||
|
@ -92,11 +87,6 @@ ROOT_URLCONF = 'main.urls'
|
||||||
|
|
||||||
# WSGI_APPLICATION = 'demo.wsgi.application'
|
# WSGI_APPLICATION = 'demo.wsgi.application'
|
||||||
|
|
||||||
SIMPLE_JWT = {
|
|
||||||
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=60),
|
|
||||||
"REFRESH_TOKEN_LIFETIME": timedelta(days=365),
|
|
||||||
}
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
|
||||||
|
@ -141,8 +131,6 @@ MEDIA_URL = '/media/'
|
||||||
MEDIA_ROOT = BASE_DIR / 'media'
|
MEDIA_ROOT = BASE_DIR / 'media'
|
||||||
STATICFILES_DIRS = [BASE_DIR / 'static']
|
STATICFILES_DIRS = [BASE_DIR / 'static']
|
||||||
|
|
||||||
# TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
|
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
|
@ -214,13 +202,8 @@ else:
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||||
'rest_framework.authentication.SessionAuthentication',
|
'rest_framework.authentication.SessionAuthentication',
|
||||||
'rest_framework.authentication.TokenAuthentication',
|
|
||||||
'dj_rest_auth.jwt_auth.JWTCookieAuthentication'
|
|
||||||
),
|
),
|
||||||
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
|
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
|
||||||
# 'DEFAULT_PERMISSION_CLASSES': [
|
|
||||||
# 'rest_framework.permissions.IsAuthenticated',
|
|
||||||
# ],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWAGGER_SETTINGS = {
|
SWAGGER_SETTINGS = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue