Windows 无法识别我的命令行参数

Windows 无法识别我的命令行参数
C:\Users\Drew Gross\Documents\Projects\Batadase\src>django-admin.py startproject batadase
Usage: django-admin.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=all 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           Print traceback on exception
  --version             show program's version number and exit
  -h, --help            show this help message and exit

Type 'django-admin.py help <subcommand>' for help on a specific subcommand.

Available subcommands:
  cleanup
  compilemessages
  createcachetable
  dbshell
  diffsettings
  dumpdata
  flush
  inspectdb
  loaddata
  makemessages
  reset
  runfcgi
  runserver
  shell
  sql
  sqlall
  sqlclear
  sqlcustom
  sqlflush
  sqlindexes
  sqlinitialdata
  sqlreset
  sqlsequencereset
  startapp
  startproject
  syncdb
  test
  testserver
  validate

C:\Users\Drew Gross\Documents\Projects\Batadase\src>

我认为这不正常。我想不出我最近做过什么事会导致这种情况发生,虽然我做了很多事,但我记不清了。它过去确实有效。

答案1

在我看来这完全正常。您调用的命令接收并解释您的参数。显然 django-admin.py 对您的参数“start-admin”和“batadase”表示异议。

答案2

我在这里找到了答案:https://stackoverflow.com/questions/9880540/python-command-line-arguments-windows

我需要将 %* 添加到注册表中才能打开 python 文件。

相关内容