当前位置:网站首页>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
边栏推荐
- RC低通滤波器的逆系统
- Differences among electric drill, electric hammer and electric pick
- 做数据可视化应该避免的8个误区
- io. Platform. packageRoot; // ignore: deprecated_ Member_ use
- Leetcode - > 1 sum of two numbers
- 2019 is coming to an end, the longest day.
- POI export message list (including pictures)
- win10, mysql-8.0.26-winx64. Zip installation
- leetcode005--原地删除数组中的重复元素
- 数据孤岛是什么?为什么2022年仍然存在数据孤岛?
猜你喜欢
[paper reading] [3D target detection] point transformer
Unity rawimage background seamlessly connected mobile
QML进阶(五)-通过粒子模拟系统实现各种炫酷的特效
程序员抱怨:1万2的工资我真的活不下去了,网友:我3千咋说
补:注解(Annotation)
New terminal play method: script guidance independent of technology stack
那些年我面试过的Android开发岗总结(附面试题+答案解析)
補:注解(Annotation)
Experience summary and sharing of the first prize of 2021 National Mathematical Modeling Competition
IDE idea automatic compilation and configuration of on update action and on frame deactivation
随机推荐
PIP3 installation requests Library - the most complete pit sorting
Redis command Encyclopedia
Eksctl deploying AWS eks
补:注解(Annotation)
Logger and zap log Library in go language
简单的拖拽物体到物品栏
Better way to read configuration files than properties
JS generates a specified number of characters according to some words
test
Mysql, binlog log query
Summary of MySQL de duplication methods
zynq平台交叉编译器的安装
Introduction to raspberry pie 3B - system installation
The perfect combination of collaborative process and multi process
Innovative practice of short video content understanding and generation technology in meituan
test
Flink's important basics
POI export message list (including pictures)
leetcode001--返回和为target的数组元素的下标
Recommended scheme of national manufactured electronic components