Commit f522953a authored by Ilham Maulana's avatar Ilham Maulana 💻

fix: shift to not use drf

parent 9797a30f
......@@ -11,7 +11,6 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
"""
from pathlib import Path
from django.utils.timezone import timedelta
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -43,34 +42,10 @@ INSTALLED_APPS = [
"book.apps.BookConfig",
"loans.apps.LoansConfig",
"dashboard.apps.DashboardConfig",
# 3rd party
"rest_framework",
"rest_framework.authtoken",
"rest_framework_simplejwt",
"django_filters",
]
# 3rd party config
# DJANGO REST FRAMEWORK CONFIG
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework.authentication.TokenAuthentication",
],
"DEFAULT_FILTER_BACKENDS": ["django_filters.rest_framework.DjangoFilterBackend"],
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 10,
}
SIMPLE_JWT = {
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=60),
"SLIDING_TOKEN_REFRESH_LIFETIME": timedelta(days=1),
"SLIDING_TOKEN_LIFETIME": timedelta(days=30),
"SLIDING_TOKEN_REFRESH_LIFETIME_LATE_USER": timedelta(days=1),
"SLIDING_TOKEN_LIFETIME_LATE_USER": timedelta(days=30),
}
# end 3rd party config
MIDDLEWARE = [
......
......@@ -53,8 +53,6 @@ urlpatterns = [
),
# api
path("api/v1/", include("api.urls"), name="API_V1"),
# 3rd party
path("api-auth/", include("rest_framework.urls"), name="api_auth"),
]
if settings.DEBUG:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment