~玉米糊~
慢慢来,也会很快。 非宁静无以志学,学什么都一样,慢慢打基础,找规律、认真、坚持,其余的交给时间。

安装pymysql依赖
pip install pymysql

pip install pymysql -i 国内的源

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学 http://pypi.hustunique.com/
山东理工大学 http://pypi.sdutlinux.org/
豆瓣 http://pypi.douban.com/simple/
pip install pymysql -i http://mirrors.aliyun.com/pypi/simple/

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'HOST': 'localhost',
        'PORT': '3306',
        'NAME': 'db_name',
        'USER': 'test',
        'PASSWORD': 'm9uSFL7duAVXfeAwGUSG'
                    ''
                    ''
                    '',
        'OPTIONS': {
            'sql_mode': 'traditional',
        }
    }
}

 

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

修改为

LANGUAGE_CODE = 'zn-hans'

TIME_ZONE = 'Asia/Shanghai'
posted on 2021-11-14 15:40  yuminhu  阅读(31)  评论(0)    收藏  举报