This commit is contained in:
2026-03-25 01:54:43 +03:30
parent d572265d9c
commit 24b90a8c81
17 changed files with 411 additions and 12 deletions
+6 -7
View File
@@ -18,10 +18,7 @@ INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"auth.apps.AuthConfig",
"account",
"sensor_hub",
"dashboard",
"ingest",
"rest_framework",
"corsheaders",
]
@@ -98,9 +95,11 @@ REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES": [
"rest_framework.permissions.AllowAny",
],
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework_simplejwt.authentication.JWTAuthentication",
],
}
if "rest_framework_simplejwt" in INSTALLED_APPS:
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"] = [
"rest_framework_simplejwt.authentication.JWTAuthentication",
]
CORS_ALLOW_ALL_ORIGINS = DEBUG
+1 -5
View File
@@ -3,9 +3,5 @@ from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
path("api/auth/", include("auth.urls")),
path("api/account/", include("account.urls")),
path("api/sensor-hub/", include("sensor_hub.urls")),
path("api/farm-dashboard-config/", include("dashboard.urls_config")),
path("api/farm-dashboard/", include("dashboard.urls")),
path("api/ingest/", include("ingest.urls")),
]