mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-21 13:59:36 +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',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
# 'dj_rest_auth',
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.headless',
|
||||
# 'dj_rest_auth.registration',
|
||||
'allauth.socialaccount',
|
||||
'allauth.socialaccount.providers.facebook',
|
||||
'drf_yasg',
|
||||
'corsheaders',
|
||||
'adventures',
|
||||
'worldtravel',
|
||||
'users',
|
||||
'django.contrib.gis',
|
||||
|
||||
)
|
||||
|
||||
MIDDLEWARE = (
|
||||
|
@ -84,7 +80,6 @@ CACHES = {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
# For backwards compatibility for Django 1.8
|
||||
MIDDLEWARE_CLASSES = MIDDLEWARE
|
||||
|
||||
|
@ -92,11 +87,6 @@ ROOT_URLCONF = 'main.urls'
|
|||
|
||||
# WSGI_APPLICATION = 'demo.wsgi.application'
|
||||
|
||||
SIMPLE_JWT = {
|
||||
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=60),
|
||||
"REFRESH_TOKEN_LIFETIME": timedelta(days=365),
|
||||
}
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||
|
||||
|
@ -141,8 +131,6 @@ MEDIA_URL = '/media/'
|
|||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
STATICFILES_DIRS = [BASE_DIR / 'static']
|
||||
|
||||
# TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
|
@ -214,13 +202,8 @@ else:
|
|||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework.authentication.SessionAuthentication',
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
'dj_rest_auth.jwt_auth.JWTCookieAuthentication'
|
||||
),
|
||||
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
|
||||
# 'DEFAULT_PERMISSION_CLASSES': [
|
||||
# 'rest_framework.permissions.IsAuthenticated',
|
||||
# ],
|
||||
}
|
||||
|
||||
SWAGGER_SETTINGS = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue