add apps and drf_yasg

This commit is contained in:
behruz-dev
2025-07-30 16:14:47 +05:00
parent 180fa70758
commit da201800b4
29 changed files with 102 additions and 20 deletions

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

@@ -0,0 +1,32 @@
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
schema_view = get_schema_view(
openapi.Info(
title="UyQur API",
default_version='v1',
description="Test description",
terms_of_service="https://www.google.com/policies/terms/",
contact=openapi.Contact(email="xoliqberdiyevbehru12@gmail.com"),
license=openapi.License(name="Felix IT Solutions License"),
),
public=False,
permission_classes=(permissions.IsAuthenticated,),
)
SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': {
'Basic': {
'type': 'basic'
},
'Bearer': {
'type': 'apiKey',
'name': 'Authorization',
'in': 'header'
}
},
"USE_SESSION_AUTH": False
}