Cache simulation
django-admin startproject rmysite3 create django project
python3 manage.py startapp user to create applications py
33 rows 47 Registered application middleware
Line switch database 77
__Init__.py to deceive: import pymysql pymysql.install_as-MySQLdb ()
Create a database: create database rmysite3 default charset utf8;
models.py: Create a class verbose_name: Yes Note
Synchronization to the terminal: python3 manage.py makemigrations
python3 manage.py migrate
See if django occupied: sudo lsof -i: 8000
If there is occupation: sudo kill -9 pid
Start django: python3 manage.py runserver
Go views.py: do view function
Add the primary route (url):
Create a distribution route:
Ordered set
Returns the specified range of elements
zrangebyscore key min max [withscores] [limit offset count]
ZRANGEBYSCORE z1 900 1000 withscores (minimum 900--1000 person)
Parentheses: open interval zrangebyscore fruits (2.0 8.0 2.0 <t <= 8.0)