1 安装依赖包
pip install coreapi
2 seting.py的文件配置
REST_FRAMEWORK = {
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema',
}
3 url的配置
from django.conf.urls import url
from rest_framework.documentation import include_docs_urls
url(r'^docs/', include_docs_urls(title='接口文档')),
0则评论给“django coreapi”