当前位置:网站首页>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 :
边栏推荐
- 【CDH】CDH/CDP 环境修改 cloudera manager默认端口7180
- 第4阶段 Mysql数据库
- Wangeditor rich text component - copy available
- Pytorch基础
- vs2019 桌面程序快速入门
- DICOM: Overview
- Valentine's Day flirting with girls to force a small way, one can learn
- L2-007 family real estate (25 points)
- QT creator runs the Valgrind tool on external applications
- nodejs 详解
猜你喜欢

B tree and b+ tree of MySQL index implementation
![[yarn] CDP cluster yarn configuration capacity scheduler batch allocation](/img/85/0121478f8fc427d1200c5f060d5255.png)
[yarn] CDP cluster yarn configuration capacity scheduler batch allocation

Mysql的索引实现之B树和B+树

分布式事务的实现方案

error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_ s instead

STM32型号与Contex m对应关系

MTCNN人脸检测

Learn winpwn (3) -- sEH from scratch

Valentine's Day flirting with girls to force a small way, one can learn

【yarn】CDP集群 Yarn配置capacity调度器批量分配
随机推荐
【yarn】Yarn container 日志清理
分布式节点免密登录
[MRCTF2020]套娃
nodejs连接Mysql
SQL时间注入
Pytoch Foundation
MySQL与c语言连接(vs2019版)
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
L2-004 这是二叉搜索树吗? (25 分)
[蓝桥杯2017初赛]包子凑数
Antlr4 uses keywords as identifiers
4、安装部署Spark(Spark on Yarn模式)
Why can't STM32 download the program
分布式事务的实现方案
wangeditor富文本引用、表格使用问题
Request object and response object analysis
Are you monitored by the company for sending resumes and logging in to job search websites? Deeply convinced that the product of "behavior awareness system ba" has not been retrieved on the official w
JS array + array method reconstruction
Solution to the practice set of ladder race LV1 (all)
QT creator custom build process