Django -- configuration and usage of mako

1, Foreword mako's biggest feature is that it allows Python code to be written freely in HTML. It's very exciting to stand up!! 2, Preparation stage Create a new project mako_project, create a new app called app, and then install mako (to be installed online) pip install mako Then register the app, configure templates and static files, wh ...

Posted by lordphilippe on Fri, 12 Nov 2021 14:29:56 +0100

Django (74) DRF spectral automatically generates interface documents

introduce DRF spectral is a reasonable and flexible OpenAPI 3.0 pattern generated for Django REST Framework. It can automatically help us extract the information in the interface to form the interface document, and the content is very detailed, so we don't have to worry about writing the interface document anymore This library mainly achieves t ...

Posted by mistjulia on Tue, 02 Nov 2021 17:11:36 +0100

Black horse programmer python online class notes (Continued)

Object oriented encapsulation case 01. Xiaoming loves running demand Weight 75 kgLose 0.5kg per runEat and gain 1 kg class Person: def __init__(self,name,weight): # self. Attribute = formal parameter self.name = name self.weight = weight def __str__(self): return "My name is%s Weight is%.2f kg ." % (sel ...

Posted by highrevhosting on Sun, 31 Oct 2021 04:33:28 +0100

A task of Django+Celery is revoked

Premise: it is necessary to perform the function of suspending (revoking) a task without affecting the continued execution of other tasks Find out that celery 3.0 has the revoke function The official document of celery describes revoke Here is the test code Django3.2.8 (this version is not important, but the following two are important) django ...

Posted by AKA Panama Jack on Fri, 15 Oct 2021 04:39:48 +0200

Django framework basic class view and Middleware

1, Class view 1. Using the class view, different request modes corresponding to the view can be defined differently by different methods in the class. As follows: from django.views.generic import View class RegisterView(View): """Class view: processing registration""" def get(self, request): """handle GET Request, return to ...

Posted by idontkno on Tue, 12 Oct 2021 19:49:14 +0200

A simple student management system based on Django Web framework (Python)

Web development of student management system Python Author: bug Maker - Xiao Liu Background: After learning and mastering a certain basis of Python, I preliminarily learned and understood Django's web development framework and the basic usage of MySQL database. Through Django's learning, I completed the web development practice of si ...

Posted by rodneykm on Sun, 03 Oct 2021 20:55:49 +0200

Deploy code to Django-based servers (Tencent Cloud)

Note: This article is my own note, no logic, just for myself Essential information:  python:3.6.8  Django:2.1.15 _System: Cent OS 7 _Server: Tencent Cloud Django Official Website One: Some linux commands used Use django-admin to create a Django project django-admin startproject mysite #This mysite is the project name Start Ser ...

Posted by Atomic Taco on Tue, 21 Sep 2021 18:23:49 +0200

The origin of flash flash, the construction of virtual environment, the creation of the first flash program, and the interpretation of flash program

1 what is flash? Flask was originally an April Fool's Day joke by author Armin Ronacher on April 1, 2010, but later became very popular and became a formal web framework written in python Flask is a Web micro framework written in Python, which allows us to quickly implement a website or Web service using Python language. Before introducing ...

Posted by dukeu03 on Sat, 11 Sep 2021 02:21:35 +0200

django implements foreground and background data binding by submitting form with ajax+post

The first step is to introduce jquery files, either online or offline, to add to your own staticfiles What's demonstrated here is adding offline <script src={% static 'js/jquery-2.1.1.min.js' %}></script> Note that this sentence is added before the ajax jquery script you write. Then the HTML form is as follows: ...

Posted by TraceyK on Tue, 07 Jul 2020 16:31:40 +0200

Pandas of Python data analysis: time series

CSDN Course recommendation: towards data scientist: take you to play Python data analysis, lecturer Qi Wei, CTO of Suzhou Yantu Education Technology Co., Ltd., member of the master's Steering Committee of applied statistics major of Suzhou University; published "learn python with the old: easy introduction", "learn python wit ...

Posted by thegman on Sat, 27 Jun 2020 06:52:12 +0200