dodan user

This commit is contained in:
2024-01-18 12:03:37 +01:00
parent 75c00b0e91
commit 298219ab30
32 changed files with 912 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ INSTALLED_APPS = [
'drf_yasg',
# Custom apps:
'plovidba_aplikacija',
'user',
]
MIDDLEWARE = [
@@ -104,6 +104,13 @@ DATABASES["default"]["TEST"] = {
"NAME": ENV_STR("DATABASE_TEST_NAME", "test_plovidba_dev_db")
}
AUTH_USER_MODEL = "user.User"
AUTHENTICATION_BACKENDS = [
# Needed to login by username in Django admin, regardless of `allauth`
"django.contrib.auth.backends.ModelBackend",
]
# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators

View File

@@ -41,6 +41,7 @@ urlpatterns = [
path('api/', include('plovidba_aplikacija.urls')),
path("swagger/", api_schema_view.with_ui("swagger", cache_timeout=0), name="schema-swagger-ui"),
path("redoc/", api_schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"),
path('user/', include('user.urls')),
]
if settings.SHOW_API_DOCS: