V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  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
shimingzhoudf
V2EX  ›  Python

django 库名

  •  
  •   shimingzhoudf · Oct 15, 2019 · 2910 views
    This topic created in 2387 days ago, the information mentioned may be changed or developed.

    django 的数据库表名怎么设置默认为大写,,自动的生成的表,比如(auth_group,auth_group_permissions,auth_permission 等等)

    1 replies    2019-10-15 22:59:15 +08:00
    xpresslink
        1
    xpresslink  
       Oct 15, 2019
    自定义的 model 可以指定表名。
    https://docs.djangoproject.com/en/2.2/topics/db/models/#meta-options
    https://docs.djangoproject.com/en/2.2/ref/models/options/

    你说的那个几个自动生成的表是 内置 auth 应用模块中定义的类生成的,要魔改那部分的 Model 定义源代码才能实现, 以你的水平应该还没能力改。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5123 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 09:45 · PVG 17:45 · LAX 02:45 · JFK 05:45
    ♥ Do have faith in what you're doing.