Tag Python

Abstract class in Django model (abstract)

First, let’s introduce what attributes the django model has: Let’s look at an example first: The Meta of the Django model class is an internal class, which is used to define the behavior characteristics of some Django model classes. The following…

Database migration in django

Django is a web development framework written in python. Its characteristics are:   1. Heavyweight framework, with many functional components encapsulated inside, making development easier and faster,   2.MVT mode: front-end and back-end separation, high cohesion and low coupling, m: model, the…

Python characters and bytes new compilation

character A character is an information unit, in simple terms it is a letter, number, punctuation mark, Chinese character, etc. The best definition of a character is a Unicode character: It is a global standard that can represent characters in…

How do I create a Python list?

Python3’s basic data type inside a very important ordered collection of objects, it is a list (List), support in place to modify, can contain any kind of other objects, even the list itself, this article we will look at the…

Python3 list clear() method

Brief introduction python list’s clear() function method is used to clear the entire list (list), the role is the same as del lis[:], but it is different from the list’s remove method, the former is to clear the latter is…

Python3 List append() method usage

In this article, let’s learn about Python’s append method for lists. Introduction The list append() method adds a new element() to the end of the current list object. Grammar Syntax of the append() method. Passing parameters The element x is…

Django HttpResponse and JsonResponse

1. HttpResponse After the Django server receives the request sent by the client, it will encapsulate the submitted data into an HttpRequest object and pass it to the view function. Then the view function also needs to return a response…