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