第25月第4天 Blog-API-with-Django-Rest-Framework项目记录01
#------------------------------
1. djangochinaorg项目
https://github.com/DjangoChinaOrg/Django-China-API
https://github.com/DjangoChinaOrg/Django-China-FE
2.vue proxyTable
proxyTable: { '/proxy': { target: 'http://localhost:8000', changeOrigin: true, pathRewrite: { '^/proxy': '' } } },
#------------------------------
1.Blog-API-with-Django-Rest-Framework
https://www.bilibili.com/video/av11744508/
https://github.com/codingforentrepreneurs/Blog-API-with-Django-Rest-Framework
djangorestframework==3.3.3
在Django-By-Example第一章 新增rest功能
在blog目录下建立api目录,新增 serializers.py urls.py views.py
修改setting.py 加入rest_framework
修改urls.py 加入url(r'^api/posts/', include("blog.api.urls", namespace='posts-api')),
https://www.django-rest-framework.org/api-guide/generic-views/#genericapiview