Django
Packaging a Django Development Environment with Docker from Scratch (2) Dockerfile
· ☕ 9 min read
1. Basic Concepts A Dockerfile is a collection of instructions for building a Docker image. Docker reads Dockerfile instructions to build an image automatically. A Dockerfile is similar to a Makefile: both are text files that organize all the instructions in the order the image is built. The command to build a Docker image:

Django Application Performance Testing Based on Docker
· ☕ 5 min read
1. Basic Website Performance Metrics Concurrency: the number of sessions the server handles per unit of time Throughput: the number of requests the server handles per unit of time Response time: the total elapsed time from when the user sends a request to when the response is fully received, made up of network transmission time, service processing time, and other parts Average response time: the average of the response times of all requests 2.

Django Forms Functionality
· ☕ 3 min read
1. Automatically Generating HTML Form Elements A Widget is the tool used to render an HTML element. Specifying a widget 1 2 3 4 5 6 from django import forms class CommentForm(forms.Form): name = forms.CharField() url = forms.URLField() comment = forms.CharField(widget=forms.Textarea) Output of CommentForm().as_table() 1 2 3 4 5 6

Django ORM and SQL
· ☕ 7 min read
1. Basic Concepts ORM: Object Relational Mapping. Its job is to map between a relational database and objects. No complex SQL statements are needed — operating on data is as simple as operating on objects. QuerySet: the list of objects for a given model. A QuerySet lets you read data

Haystack Full-Text Search
· ☕ 3 min read
A quick word on the project requirements: the team needed to publish documentation externally. The documents are written in Markdown and need to be published as HTML. At first we used an Nginx + Jekyll solution. As the documentation grew, the document system developed a strong need for search. I