python manage.py命令


# [django]
# 创建新的模块
python manage.py startapp 模块名  

#创建新项目
python manage.py startproject 

#创建当前应用的迁移数据文件
python manage.py makemigratios 模块名

#生成数据库表
python manage.py migrate

#查看迁移文件生成的SQL语句
python manage.py sqlmigrete 模块名 0001

#根据已有的数据库表反向生成Models
python manage.py inspectdb>模块名/models.py

[auth]
    changepassword
    createsuperuser

[contenttypes]
    remove_stale_contenttypes

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
  
    loaddata
    makemessages

    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver

[sessions]
    clearsessions

[staticfiles]
    collectstatic
    findstatic
    runserver

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM