feat: base 生产环境关闭swagger2
This commit is contained in:
parent
323be38d38
commit
d443277e28
|
@ -73,7 +73,7 @@ urlpatterns = [
|
||||||
static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
|
static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
|
||||||
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
|
|
||||||
if settings.DEBUG:
|
if getattr(settings, 'ENABLE_SWAGGER', True):
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
# api文档
|
# api文档
|
||||||
path('api/swagger/', schema_view.with_ui('swagger',
|
path('api/swagger/', schema_view.with_ui('swagger',
|
||||||
|
|
Loading…
Reference in New Issue