Version of Django REST framework

Article catalog 1. GET parameter get version 2. URL path to get version 3. Built in version source code process 4. Built in version class 1. GET parameter to get version The RESTful specification specifies that the version can be placed on the URL, such as http://127.0.0.1:8000/api/users/?vers ...

Added by Castle on Mon, 29 Jun 2020 09:02:55 +0300

django Series 5 - QuerySet API operation

QuerySet API usage QuerySet can construct, filter, slice, and approximate results without actually accessing the database. Unless you do something to evaluate the query set, no query activity actually occurs to the database. (1) Basic properties iteration The QuerySet is iterative, and its databa ...

Added by Phire on Tue, 16 Jun 2020 06:59:36 +0300

django user authentication component auth

brief introduction django provides a very useful component which is responsible for the full set of functions of user login authentication, which is the auth component. With the auth component, we no longer need to manually write the login check decorator, nor set session s manually to save user state. The django project executes the databas ...

Added by oughost on Wed, 10 Jun 2020 04:51:49 +0300

Four ways in Python singleton mode

Singleton Pattern is a common software design pattern. The main purpose of this pattern is to ensure that only one instance of a class exists. When you want to have only one instance of a class in the whole system, a singleton object can be used. For example, the configuration information of a server program is stored in a file, and the client ...

Added by Andrew R on Mon, 20 Apr 2020 18:53:38 +0300

Django website project offline QR code scanning payment

1. Preliminary work Before proceeding, we need a Alipay sandbox environment to enter the sandbox environment web site: https://openhome.alipay.com/platform/appDaily.htm?tab=info     The way to set the key is to download the Alipay generated key tool: the address and the extraction code of the toolkit: Link: https://pan.baidu.com/s/1AXK3s4S ...

Added by rlgriffo on Tue, 14 Apr 2020 13:53:02 +0300

django project case understanding, using advanced features to improve the blog program

Chapter II Contents: Using django to send mail Create forms and process them in views Create form from model Consolidate third-party applications Building a complex QuerySet 2.1 sharing posts by email For the mail sending function of a post, you need to do the following: Create user form, fill in nam ...

Added by harishkumar09 on Tue, 10 Mar 2020 04:44:45 +0200

The method of generating random number in Python built-in random module

This article mainly introduces the method of generating random numbers by Python's built-in random module. This article gives you a very detailed introduction, which has certain reference value. You can refer to In this paper, we introduce in detail the other methods of generating random sequence in the ...

Added by rwoods on Sat, 22 Feb 2020 15:50:30 +0200

Learn python-day02-22--From Python Distributed Crawler Creating Search Engine Scrapy

Section 366, Python Distributed Crawler Build Search Engine Scrapy Speech - bool Combinatorial Query of Elicsearch bool query description filter:[], field filtering, does not participate in scoring Must:[], if there are multiple queries, they must satisfy [and] should:[], if there are multiple queries, ...

Added by jonshutt on Tue, 18 Feb 2020 05:14:49 +0200

The realization of a Python intelligent chat robot for Valentine's Day

  First package required by the project import urllib.request import urllib.parse from tkinter import * import time PS:Many other people are learning Python In the process, I often give up because I can't solve the problem or I don't have a good tutorial. For this reason, I sorted out the basic python Script to web Development, reptile dja ...

Added by sidney on Fri, 14 Feb 2020 18:06:02 +0200

ORM of django model layer

Introduction In the process of developing web applications with Django framework, it is inevitable that data management operations (such as add, delete, change, check) will be involved. When talking about data management operations, database management software, such as mysql, oracle, Microsoft SQL ...

Added by jake8 on Fri, 07 Feb 2020 07:27:47 +0200