django 常用命令 详解

本文详细介绍了Django命令行工具的各种命令及其用法,包括如何检查项目问题、创建缓存表、运行服务器等,为Django开发者提供了实用指南。

 check     compilemessages     createcachetable     dbshell     diffsettings     dumpdata     flush     inspectdb     loaddata     makemessages     makemigrations     migrate     runserver     sendtestemail     shell     showmigrations     sqlflush     sqlmigrate     sqlsequencereset     squashmigrations     startapp     startproject     test     testserver

一 、解释:

 二、如何查看命令解释

  在电工开发环境中使用  django-admin.py + help  + 命令行  既可以查看命令的解释

  example:我们要查看check命令

(django_basic_venv) C:\Users\xuchunlin>django-admin.py help check
usage: django-admin.py check [-h] [--version] [-v {0,1,2,3}]
                             [--settings SETTINGS] [--pythonpath PYTHONPATH]
                             [--traceback] [--no-color] [--tag TAGS]
                             [--list-tags] [--deploy]
                             [app_label [app_label ...]]

Checks the entire Django project for potential problems.

positional arguments:
  app_label

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions
  --no-color            Don't colorize the command output.
  --tag TAGS, -t TAGS   Run only checks labeled with given tag.
  --list-tags           List available tags.
  --deploy              Check deployment settings.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值