#12 Changed djangorestframework-jwt to djangorestframework-simplejwt

This commit is contained in:
Ojakoo
2022-06-21 21:35:59 +03:00
parent 5eef2f685c
commit e70e598c57
5 changed files with 56 additions and 42 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ INSTALLED_APPS = [
"kaehmy",
"ohlhafv",
"rest_framework",
"rest_framework_jwt",
"rest_framework_simplejwt",
"django_nose",
"bootstrap3",
"django_tables2",
@@ -178,7 +178,7 @@ REST_FRAMEWORK = {
"rest_framework.permissions.IsAdminUser",
),
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework_jwt.authentication.JSONWebTokenAuthentication",
"rest_framework_simplejwt.authentication.JWTAuthentication",
),
# 'DEFAULT_THROTTLE_CLASSES': (
# 'members.throttles.BurstRateThrottle',
+3 -2
View File
@@ -14,6 +14,7 @@ from dotenv import load_dotenv
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sikweb.base import *
from datetime import timedelta
load_dotenv() # loads the configs from .env
@@ -61,7 +62,7 @@ DEFAULT_EMAIL_FROM = "SIK"
DEFAULT_EMAIL_FROM_ADDR = "noreply@sahkoinsinoorikilta.fi"
ENABLE_AUTOMATIC_EMAILS = True
# Database settings
# Database settingsfrom datetime import timedelta
# Only uncomment if default settings in base.py are not ok
DB_OPTIONS = {"sslmode": "require"} if os.getenv("DB_SSL", False) == "True" else {}
@@ -76,4 +77,4 @@ DATABASES = {
"PORT": os.getenv("DB_PORT", 5432),
"OPTIONS": DB_OPTIONS,
}
}
}