Use django vue to implement web projects with separation of front and back ends, taking the CRUD project as an example
- Backends
- django
- django rest framework
- django cors headers
- Frontends
- vue
- bootstrap
- fontawesome
- Backend
- Install Django I have installed it here
- Create a django project
- Add the model of the blog, and add some initial data
- Use restframework to add serializer, viewset, urls
- Set cross-domain cors headers
- Front end
- Install node vue has been configured in advance
- Create a front-end project with vue-cli
- Modify index.html homepage to add bootstrap css framework and fontawsome font dependency
- Modify App.vue and core components
- Add axios http request component
- Add request backend code