小编Muk*_*mar的帖子

休息框架招摇'AutoSchema'对象没有属性get_link

我正在尝试浏览rest framework swagger的api文档。但得到错误 AttributeError: 'AutoSchema' object has no attribute 'get_link

我使用过 django rest 框架招摇。但无法浏览文档。

from django.contrib import admin
from django.urls import path, include
from rest_framework_swagger.views import get_swagger_view

schema_view = get_swagger_view(title='API')

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include('auth.urls')),
    path('docs/', schema_view),
]
Run Code Online (Sandbox Code Playgroud)

django

9
推荐指数
2
解决办法
4647
查看次数

标签 统计

django ×1