Django|URL and view
view
Views are usually written in the views. Of the app Py. And the first parameter of the view is always request (an HttpRequest) object. This object stores all the information from the request, including the parameters carried and some header information. In the view, logic related operations are generally completed. For example, if the requ ...
Added by almightyegg on Thu, 16 Dec 2021 21:42:24 +0200
The boss teaches you to analyze the growth trend of e-quotient marketing with Python
Introduction: today I will bring you an e-commerce data analysis case. I sorted it out and shared it with you in the form of notes. The background of the case is that the overall sales of an e-commerce have been rising for several consecutive years, but the growth rate has slowed down in recent years. It is necessary to find effe ...
Added by sastro on Thu, 16 Dec 2021 12:12:56 +0200
Python based Django blog - home page
In this article, we will complete a home page.
Register APP
When a Django project is large enough, we can divide the project into several apps and develop them separately. If the project is XX University, then APP is XX college. -Python learning network
Open CMD and create an article management APP:
PYTHON manage.py startapp ar ...
Added by cjacks on Sat, 11 Dec 2021 15:14:24 +0200
Knowledge summary of open source web framework django
Knowledge summary of open source web framework django (11)
Account login
Introduction to front page
login.html file
@submit.prevent #Block default commit
You can use the v-cloak instruction to set styles that will be removed from the bound HTML elements at the end of Vue instance compilation.
When the network is slow and the web page is ...
Added by jayjay960 on Wed, 08 Dec 2021 00:20:52 +0200
Python Web Framework -- the second day of Django learning
1: Install and create a Django project
1. Install Django package
pip install django
2. Command to create a Django project Django admin startproject + (file name)
django-admin startproject my_site
3. Run Django file Note: the command must be in the Django file directory you created, that is, the upper level file directory of manage.py
...
Added by bkanmani on Tue, 07 Dec 2021 20:23:42 +0200
How to deploy Django and run it
nginx+uwsgi+Django installation
1. Introduction
linux edition Centos7.5
uwsgi-2.0.20
Django-3.2.9
python3.9.0
nginx-1.16.0
2. Install nginx
For the connection of installing nginx, please refer to this: https://blog.csdn.net/weixin_44217786/article/details/121608813
3. Install uwsgi
Download the official website: https://uwsgi-docs.readth ...
Added by AXiSS on Wed, 01 Dec 2021 10:50:02 +0200
Automated test platform: develop user authentication interface
1, Foreword
For a system, user module is very basic and important. The test platform also needs to manage users and user permissions. The following explains how to quickly make a user login authentication interface through DRF.
2, Verification login explanation
1) Create user
Enter the project directory of django and execute the fol ...
Added by InfiniteA on Sun, 28 Nov 2021 07:39:01 +0200
Super detailed explanation of serializer in Django DRF framework
preface
Over the past few years, I have been struggling in the it industry. Along the way, many have summarized some high-frequency interviews in the python industry. I see most of the new blood in the industry, and I still have all kinds of difficult questions for the answers to all kinds of interview questions or collection
Therefore, I dev ...
Added by thegreatdanton on Thu, 25 Nov 2021 03:25:22 +0200
Basic programming in Python: an example of turtle drawing in Python
This article mainly introduces the examples of turtle drawing in Python, and shares several small examples of turtle drawing, which has certain reference value. Friends in need can learn about it
In Python, turtles can not only draw simple black lines, but also draw more complex geometric shapes with different colors, and even fill shapes with ...
Added by Skara on Tue, 23 Nov 2021 10:07:40 +0200
Login and registration small case implementation (use the form form in Django to verify the user input data; the source code is attached at the end of the paper)
Login registration case
1. The first step of login and registration - create a model and generate a data table:
(1) Create in the models.py file under the app named mucis:
from django.db import models
# Create your models here.
class User(models.Model):
username = models.CharField(max_length=30, unique=True)
password = models.CharF ...
Added by dare87 on Sun, 21 Nov 2021 03:56:27 +0200