Python
Drawing Fractals with Python: Koch Curves, Julia Sets, and Mandelbrot Sets
· ☕ 2 min read
1. Koch Curve The Swedish mathematician Helge von Koch proposed the Koch curve in his 1904 paper “On a continuous curve without tangents, constructible from elementary geometry.” It is described as follows: Specify the length of a line segment \(l\) (this can be thought of as iteration 0) Divide this

Permission Control in Django
· ☕ 2 min read
1. Django Built-in Permission Management 1.1 Permission Categories Permission Used to define User A’s permission on Task. User If User A has permission on Model B, then User A has the corresponding permission on all instances in Model B. The user_permission field of the User object is used to manage

Several Methods of Django Data Migration (with Code)
· ☕ 4 min read
1. Background In the course of Web development, migrating data between multiple environments (local, testing, and production) comes up often. This article mainly discusses the possible data migration paths involved in Django development, and seeks feasible methods for them. 2. Scenarios There are four data migration targets in total: the

Getting Started with Character Encoding in Python
· ☕ 3 min read
Background: I had just finished a Django data-query web project. The data came from internal API queries, and every query had to call several APIs to fetch the data and render it on the front-end page. Since the relevant data does not change often, I designed a cache to improve