creating first models

This commit is contained in:
2025-04-30 15:03:40 +03:30
parent c5cc349d90
commit 5e1428e097
20 changed files with 348 additions and 1 deletions

View File

@@ -37,8 +37,10 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
"rest_framework",
'rest_framework',
"corsheaders",
'apps.authentication.apps.AuthenticationConfig',
'apps.authorization.apps.AuthorizationConfig',
]
MIDDLEWARE = [
@@ -85,6 +87,18 @@ DATABASES = {
}
}
AUTH_USER_MODEL = 'authentication.User'
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
}
# Password validation
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators