更新admin 和 swagger
This commit is contained in:
@@ -42,6 +42,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'corsheaders',
|
||||
'drf_spectacular', # Swagger文档生成
|
||||
'drf_spectacular_sidecar',
|
||||
'shop',
|
||||
]
|
||||
|
||||
@@ -150,12 +151,9 @@ SPECTACULAR_SETTINGS = {
|
||||
'SERVE_INCLUDE_SCHEMA': True,
|
||||
'SERVE_PERMISSIONS': ['rest_framework.permissions.AllowAny'],
|
||||
'COMPONENT_SPLIT_REQUEST': True,
|
||||
'SCHEMA_PATH_PREFIX': r'/api/v[0-9]',
|
||||
'SWAGGER_UI_SETTINGS': {
|
||||
'deepLinking': True,
|
||||
'persistAuthorization': True,
|
||||
'displayOperationId': True,
|
||||
},
|
||||
'SWAGGER_UI_DIST': 'SIDECAR',
|
||||
'SWAGGER_UI_FAVICON_HREF': 'SIDECAR',
|
||||
'REDOC_DIST': 'SIDECAR',
|
||||
}
|
||||
|
||||
# django-unfold配置
|
||||
|
||||
Reference in New Issue
Block a user