当前位置:网站首页>Mall project -- day09 -- order module
Mall project -- day09 -- order module
2022-07-06 11:48:00 【mb61037a3723f67】
One : Create a new order application and migrate to create a table :
1: New application orders:
2: Register subapplication , Configure the routing :
3: Create model classes :
4: Migration table creation :

Two : Create and save order to realize :
1: edit orders/views.py Implementation view :
2: route :
3、 ... and : Concurrent order resource competition :





Four : Optimistic lock order :
1: Modify the isolation level of the database :
- (1)、 open mysql The configuration file :
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf - (2)、 Add configuration items at the end of the configuration file :
transaction-isolation=READ-COMMITTED- Be careful : According to our analysis , The isolation level here can be set to
READ-COMMITTEDorREAD-UNCOMMITTEDCan achieve optimistic locking mechanism , But followMaximize isolation strengthprinciple , Let's set it toREAD-COMMITTEDLevel ; - Higher isolation level , The more data security can be guaranteed ; The lower the isolation level , The more likely it is to produce wrong data ;
- No solution is absolutely superior or inferior , Only relatively appropriate ;
- Be careful : According to our analysis , The isolation level here can be set to
- (3)、 restart Mysql database :
sudo /etc/init.d/mysql restart
2: edit `apps/orders/views.py
5、 ... and : Settlement page :
1: edit apps/orders/views.py
Routing configuration :
边栏推荐
- Encodermappreduce notes
- JS array + array method reconstruction
- express框架详解
- About string immutability
- [Bluebridge cup 2021 preliminary] weight weighing
- Niuke novice monthly race 40
- 【CDH】CDH5.16 配置 yarn 任务集中分配设置不生效问题
- 【yarn】CDP集群 Yarn配置capacity调度器批量分配
- AcWing 1298. Solution to Cao Chong's pig raising problem
- UDS learning notes on fault codes (0x19 and 0x14 services)
猜你喜欢

Integration test practice (1) theoretical basis

Double to int precision loss

Nanny level problem setting tutorial
![[yarn] yarn container log cleaning](/img/1d/b48059ae2e6133ea9d9c38d31c4a86.png)
[yarn] yarn container log cleaning

Password free login of distributed nodes

QT creator runs the Valgrind tool on external applications

2019腾讯暑期实习生正式笔试

Word排版(小計)

How to build a new project for keil5mdk (with super detailed drawings)

UDS learning notes on fault codes (0x19 and 0x14 services)
随机推荐
ES6 let and const commands
Integration test practice (1) theoretical basis
vs2019 桌面程序快速入门
Niuke novice monthly race 40
【flink】flink学习
vs2019 第一个MFC应用程序
Learn winpwn (3) -- sEH from scratch
Double to int precision loss
MySQL与c语言连接(vs2019版)
Case analysis of data inconsistency caused by Pt OSC table change
L2-001 紧急救援 (25 分)
express框架详解
yarn安装与使用
【CDH】CDH/CDP 环境修改 cloudera manager默认端口7180
AcWing 242. A simple integer problem (tree array + difference)
XML文件详解:XML是什么、XML配置文件、XML数据文件、XML文件解析教程
Connexion sans mot de passe du noeud distribué
L2-006 tree traversal (25 points)
库函数--(持续更新)
MySQL and C language connection (vs2019 version)