Django
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 Initial Data with Fixtures
· β˜• 3 min read
1. Characteristics of Fixtures Fixtures are a new way to provide initial data, and they are used by Django’s test framework to handle test data for unit tests. Unlike SQL files, a fixture can provide a serialized file that Django’s serialization system understands; it is read, automatically converted into the corresponding model, and then saved into the database.

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