只針對用到序列化和返序列化
python
通常仍是用第三方yipidjango
pip3 install coreapiapi
setting.pyurl
INSTALLED_APPS = [ ..... 'rest_framework', ] ..... REST_FRAMEWORK = { 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema', }
from django.conf.urls import url from rest_framework.documentation import include_docs_urls urlpatterns = [ ..... url(r'docs/', include_docs_urls(title='接口文檔')) ]