Home
Sign Up
Sign In
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
django 如何在创建表的时候设置 charset 为 utf8
superbai
·
Oct 17, 2019
· 4172 views
This topic created in 2419 days ago, the information mentioned may be changed or developed.
django2.2.6,通过 django 自带的 python
manage.py
migrate 命令建表之后,发现表的 charset 是 latin1,如何设置让 django 创建表的时候默认 charset 是 utf8 呢?
django
charset
UTF8
创建
6 replies
•
2019-10-19 19:08:52 +08:00
1
janxin
Oct 17, 2019
DATABASES 里面配置了吗
2
superbai
OP
Oct 17, 2019
@
janxin
#1 是指 option 里面吗?
3
elioti
Oct 17, 2019
不是先去数据库里创建的时候 用 create database xxx charset=utf8;指明吗
4
superbai
OP
Oct 17, 2019
@
elioti
#3 是的,最后用这种方法解决了。但是想知道 django 的 model 里有没有关于字符编码的设置项
5
a852695
Oct 18, 2019
django 可以设置 但是如果你 create db 时候不是 utf8 它也修改不鸟
6
superbai
OP
Oct 19, 2019
@
a852695
#5 在哪里设置?
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
1104 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 5414617a · 37ms ·
UTC 18:19
·
PVG 02:19
·
LAX 11:19
·
JFK 14:19
♥ Do have faith in what you're doing.
❯