Additions and deletions based on Form component and based on ModelForm

Introduction to ModelForm ModelForm a. class Meta: model, # Corresponding Model Of fields=None, # field exclude=None, # Exclusion field labels=None, # Prompt message help_texts=None, ...

Posted by 1337hovie on Wed, 08 Jul 2020 08:39:55 -0700

Additions and deletions based on Form component and based on ModelForm

Introduction to ModelForm ModelForm a. class Meta: model, # Corresponding Model Of fields=None, # field exclude=None, # Exclusion field labels=None, # Prompt message help_texts=None, ...

Posted by Wolphie on Wed, 08 Jul 2020 08:40:24 -0700

python common errors and exceptions! Incidental treatment method

As a Python beginner, when learning Python programming, we often see some error messages. Python has two types of errors that are easy to recognize: syntax errors and exceptions. Python assert is used to judge an expression and trigger an exception when the expression condition is false. syntax error Python syntax errors, or parsing errors, ar ...

Posted by michaelmuller on Mon, 29 Jun 2020 20:17:42 -0700

Rent price analysis of rental housing in Shanghai

Rent price analysis of rental housing in Shanghai In this paper, we use crawler to crawl the housing rental data of Shanghai, and use python to clean, analyze and display the data, and carry out data mining modeling and prediction for housing rent. # Import related packages import pandas as pd import numpy as np import seaborn as sns import ma ...

Posted by Calamity-Clare on Mon, 29 Jun 2020 19:46:08 -0700

Exception capture and regular expression usage in python

Exception capture 1. What is exception capture """ The program can continue to run if there is an exception in the process of program execution. Note: you don't need to use exception capture all the time. You should use it when you know that there may be an exception in a certain place and you don' ...

Posted by rsmarsha on Mon, 29 Jun 2020 18:35:21 -0700

Try to write a game in python. This game is called alien invasion

preface The text and pictures of this article are from the Internet, only for learning and communication, and do not have any commercial use. The copyright belongs to the original author. If you have any questions, please contact us in time for handling. Install pygame and create a ship that can mo ...

Posted by jsims on Mon, 29 Jun 2020 02:55:29 -0700

python multi process explanation

python multitasking process 1, First demo 2, Queue 3, Process Pool 4, Case: file copying 5, Summary 1, First demo Process: after a program runs, the resource used by code + is called process, which is the basic unit of non allocated resources of the operating system. Multitasking completed by t ...

Posted by 2paulm on Sun, 28 Jun 2020 20:35:19 -0700

Why is enumeration recommended?

Enumeration is a new data type in JDK 1.5. With enumeration, we can well describe some specific business scenarios, such as spring, summer, autumn and winter in a year, Monday to Sunday in a week, and various colors, as well as some state information, such as error codes. Enumeration type not only exists in Java language, but also can be found ...

Posted by pinxxx on Sat, 27 Jun 2020 23:12:24 -0700

Asynchronous programming - coprogramming

Python asynchronous programming preface Now it's Python 3.5 and it has entered the asynchronous era Because of the existence of GIL (global lock), python can not play the advantage of multi-core, and its performance has been criticized. However, in IO intensive network programming, asynchronous processing is hundreds of times more efficient ...

Posted by stickman373 on Sat, 27 Jun 2020 22:46:42 -0700

After using Python for so long, these funny and practical libraries don't even know

As mentioned in the previous article, Python is simple and efficient because it has rich functions that can be used immediately. Recently, I read some technical articles of Github and found some interesting and practical Python libraries. It's a feeling that I'm too late to meet each other. Today, I wil ...

Posted by harvey on Sat, 27 Jun 2020 21:09:40 -0700