Django
Django Debugging Tool django-debug-toolbar
· β˜• 3 min read
1. About Django’s Performance Django is a web application framework written in Python. With Django you can develop complex, data-driven websites very simply and efficiently. At the same time, Django pays close attention to component reusability, pluggability, agile development, and DRY (Don’t Repeat Yourself). To a certain extent, Django is an application framework very well suited to implementing business logic.

Controlling Static File Versions in Django
· β˜• 2 min read
To respond quickly to user needs and meet the requirements of marketing campaigns, internet products usually have a very high release frequency. Adopting agile development shortens the delivery cycle and speeds up product iteration, but it also brings challenges to a project’s file management. Frontend engineering faces users directly, bears

Django Static File Handling
· β˜• 3 min read
1. Categories of Django Static Files Django static files fall into two categories: static and media. static: files referenced by pages, such as JS, CSS, and images media: files uploaded by users 2. Production Environment Configuration In production, you usually configure Nginx to forward static file requests while Django handles dynamic requests.

Large File Transfer in Django
· β˜• 3 min read
1. Returning the File Directly If the static file is at media/test.zip in the project root, you first have to read the file into memory and then transfer it. The code looks like this: settings.py configuration 1 2 PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media/') yourapp/views.py 1 2 3 4 5 6 7 8 9 10 11 12 from django.

Building a Django Development Environment with Vagrant
· β˜• 3 min read
Docker solves the problem of environment isolation on the same machine and improves the efficiency of operations and deployment. Vagrant gives developers a unified, near-fully-isolated environment for development and testing. This article mainly discusses how to build a Django development environment with Vagrant. Versions: VirtualBox 5.0, Vagrant 1.8. 1. Basic