# 注意: 只能是ApiView及子应用
# 1. 安装coreapi库
# 2. 主应用中配置路径
url(r'^docs/', include_docs_urls(title='接口文档'))
# 3. 主应用中settings.py配置
REST_FRAMEWORK = {
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'
}
# 4. 配置完后可直接访问
http://127.0.0.1:8000/docs/
标签:coreapi,docs,接口,文档,35,DRF
From: https://www.cnblogs.com/kh-1314/p/17149777.html