Translation Table
English | Chinese |
---|---|
front-end | 前端 |
back-end | 后端 |
pagination | 分页 |
tweaking | 拧(这里应该是修改的意思) |
queries | 查询 |
Decimal | 十进制 |
querysets | 查询集 |
Building a Modern Web Application with Django REST Framework and Vue: Building Views and REST API
Throughout this part of these tutorial series you will continue developing a CRUD (Create, Read, Update and Delete) application with a restful API back-end and a Vue front-end using Django, Django REST framework and Vue (with Axios as an HTTP client). In this part you’ll specifically build the REST API and the front-end views to consume and display data from the API endpoints. You will also see how to integrate your Vue application with your Django back-end in production. As always you can find the source code of the demo project in this Github repository.
You can check the second article from this link
- Building the REST API: You will create a simple REST API around one model (Product) with DRF(Django REST Framework) and learn how to add pagination to your APIs.
- Creating the Service to Consume the API: You will create the class that interfaces with your API using Axios.
- Creating the Front End Views: You will create different views and routes for the Vue application and see how you can protect some routes from non authenticated users.
- Getting Ready for Production: Finally you’ll prepare your app for production by tweaking some settings in Vue and Django parts.
Building the REST API
Django REST framework is a powerful and easy to use package for building Web APIs.
Let’s get started by building a simple REST API using Django REST framework.