chapter 9 用户主页面

9.1文档设置

 urls.py

from rest_framework.documentation import include_docs_urls
urlpatterns = [
        path('docs/',include_docs_urls(title='Zhixheng')),
]

在定义字段的时候加上help_text

在编辑时加上描述

在docs中还可以进行接口测试

猜你喜欢

转载自blog.csdn.net/bobbykey/article/details/81505484