当前位置:网站首页>Innovation training (V) configuration information
Innovation training (V) configuration information
2022-04-23 04:45:00 【Scattered moon】
Basic configuration
settings.py In file :
- Domain access allowed_hosts Set up an accessible domain name , The default is an empty list , When debug by true also allowed_hosts When the list is empty , The project only allows localhost or 127.0.0.1 Access on Browser . When debug by false, Set up allowed_hosts=[’*’], Allow access to all domain names .
- If you create... In a project App, Need to be in App list installed_apps add to App name .
Template configuration :
Root directory templates Common template files are usually stored , For each app Template file call . stay settings Middle configuration

Database configuration
1.pip3 install pymysql
2.pip3 install mysqlclient
Report errors

Add... To the configuration file
import pymysql
pymysql.install_as_MySQLdb()
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'cxsx',
'USER': 'root',
'PASSWORD': 'cxsx123',
'HOST': '8.140.178.29',
'PORT': '3306',
}
}


middleware
The order of each middleware is fixed !

版权声明
本文为[Scattered moon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220555418898.html
边栏推荐
- QML advanced (V) - realize all kinds of cool special effects through particle simulation system
- 阿里十年技术专家联合打造“最新”Jetpack Compose项目实战演练(附Demo)
- Code007 -- determine whether the string in parentheses matches
- Supplement: Annotation
- QML进阶(四)-绘制自定义控件
- [timing] empirical evaluation of general convolution and cyclic networks for sequence modeling based on TCN
- The programmer starts the required application with one click of window bat
- Go reflection rule
- Custom switch control
- Phishing for NFT
猜你喜欢

MySQL queries users logged in for at least N consecutive days

Spark small case - RDD, spark SQL

Recommended scheme of national manufactured electronic components for intelligent electronic scales

Recommended scheme for national production of electronic components for wireless charging

Installation du compilateur croisé de la plateforme zynq

QML advanced (IV) - drawing custom controls

数据孤岛是什么?为什么2022年仍然存在数据孤岛?

zynq平台交叉编译器的安装

Installation and use of Apache bench (AB pressure test tool)

Innovative practice of short video content understanding and generation technology in meituan
随机推荐
No such file or directory problem while executing shell
The unity camera rotates with the mouse
CLion+OpenCV identify ID number - detect ID number
QML advanced (IV) - drawing custom controls
Programmers complain: I really can't live with a salary of 12000. Netizen: how can I say 3000
Last day of 2017
Flink's important basics
使用model.load_state_dict()时,出现AttributeError: ‘str‘ object has no attribute ‘copy‘
test
简单的拖拽物体到物品栏
leetcode006--查找字符串数组中的最长公共前缀
程序员抱怨:1万2的工资我真的活不下去了,网友:我3千咋说
Summary of Android development posts I interviewed in those years (attached test questions + answer analysis)
Special topic of data intensive application system design
The programmer starts the required application with one click of window bat
Unity摄像头跟随鼠标旋转
Better way to read configuration files than properties
Practice and exploration of knowledge map visualization technology in meituan
General enumeration constant class
[paper reading] [3D target detection] point transformer