Django
Django Full-Stack Optimization Guide
· ☕ 9 min read
As the data volume exploded, the system responded very slowly. We carried out a series of optimizations on the application, and the system’s response time improved by an order of magnitude. Overall, optimizations in file compression and faster network access gave a noticeable boost to frontend performance, while optimizations in stored procedures, caching, and logic code gave a noticeable boost to backend performance.

Troubleshooting and Resolving Celery Failures on Large Files
· ☕ 3 min read
1. A Small Requirement We run into small requirements all the time, but they are not always simple to implement. Here is a simple file upload requirement, broken into the following steps: The user uploads a large file on the page The large file is temporarily stored in the internal

Python and Django Development Practices
· ☕ 6 min read
Compiled from the “Development Tips” series, collecting common problems and solutions in Python and Django development. 1. Sorting Python Iterables Iterable objects fall into 3 main categories: All sequence types, such as list, str, and tuple Some non-sequence types, such as dict and file Objects that contain an __iter__() or

How to Decouple Modules with Django Signal
· ☕ 5 min read
Recently I was responsible for developing a backend-heavy application. The data flow in this application is complex, and the processing logic has piled up in a redundant mess. The project’s tech stack is Django + Vuejs. The frontend is bundled with Webpack, managed in modules, and mainly displays data. The backend involves many modules, many processing rules, and many data tables, so every time I had to modify an earlier feature I spent a lot of time reviewing the code.

How to Safely Access request from Anywhere in Django
· ☕ 2 min read
In Django, request holds all the information for a single request. Backend processing logic frequently needs information from request. For example, the DRF framework may want to be able to obtain request at any time, or pass some parameters globally. There are third-party Django apps with tools that can satisfy