1. 数据库设置
# project/__init__.py
import pymysql
pymysql.install_as_MySQLdb()
2. 数据库python时间设置
# project/settings.py
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = False
1. 数据库设置
# project/__init__.py
import pymysql
pymysql.install_as_MySQLdb()
2. 数据库python时间设置
# project/settings.py
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = False