API
Error Code Design and Unified Exception Handling in Django
· ☕ 6 min read
I currently use Django for SaaS development, and I develop and maintain several SaaS applications at the same time. Many SaaS applications have agreed-upon error codes, some used to handle login state, others to mark business logic status. For a feature that is so strongly shared across projects, it is

Axios ajax
· ☕ 3 min read
1. Basic Concepts 1.1 Ajax Ajax stands for “Asynchronous JavaScript and XML”. At its core it is made up of the JavaScript, XmlHttpRequest, and DOM objects: through the XmlHttpRequest object it sends an asynchronous request to the server, gets data back from the server, and then uses JavaScript to manipulate

Permission Management in Django REST Framework
· ☕ 3 min read
1. Permission Management in DRF Permission management in Django REST Framework consists of two parts. One is Authentication. It specifies how the user is authenticated, obtaining request.user. The other is Permissions. It performs permission control over Django resources and user categories. 1.1 Authentication Methods The relevant source is in the rest_framework/authentication.

Getting Started with Django REST Framework
· ☕ 2 min read
In the SaaS development I work on, there is a fairly high demand for development efficiency. From project initiation, prototype design and evaluation, requirements confirmation, frontend design, and backend development through to final acceptance, we complete one iteration in just a few weeks. Guided by agile development, we began rolling

Apidoc: Practice and Automated Generation
· ☕ 3 min read
In a frontend/backend separated architecture, API documentation changes hands frequently. When third-party interfaces are involved, API and documentation changes can be even faster in multi-party collaboration scenarios. To make maintaining the API and handing over documentation easier, here is a documentation generation tool worth recommending — apidoc. 1. Introduction to