start to write contract apis

This commit is contained in:
behruz-dev
2025-07-16 14:48:56 +05:00
parent 2e6f50de43
commit 834ca060ef
18 changed files with 203 additions and 40 deletions

View File

@@ -1,7 +0,0 @@
SPECTACULAR_SETTINGS = {
"TITLE": "Your Project API",
"DESCRIPTION": "Your project description",
"VERSION": "1.0.0",
"SERVE_INCLUDE_SCHEMA": False,
"CAMELIZE_NAMES": True,
}

7
config/conf/drf_yasg.py Normal file
View File

@@ -0,0 +1,7 @@
SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': {
'basic': {
'type': 'basic'
}
},
}

View File

@@ -1,6 +1,11 @@
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": ("rest_framework_simplejwt.authentication.JWTAuthentication",),
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework_simplejwt.authentication.JWTAuthentication",
"rest_framework.authentication.BasicAuthentication",
'rest_framework.authentication.SessionAuthentication',
),
"DEFAULT_PERMISSION_CLASSES": ["rest_framework.permissions.IsAuthenticated"],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 10
}

View File

@@ -1,6 +1,5 @@
UNFOLD = {
"DASHBOARD_CALLBACK": "django_core.views.dashboard_callback",
"SITE_TITLE": None,
"SHOW_LANGUAGES": True,
"SITE_HEADER": None,