I am working on my first Django Project and while learning about migrations I was to use this command to see the lists.
我正在研究我的第一个Django项目,在学习迁移时,我将使用此命令查看列表。
python3 manage.py migrate --list
python3 manage.py migrate --list
But instead of giving me the list it gives an error
但不是给我列表,它给出了一个错误
usage: manage.py migrate [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback] [--no-color]
[--noinput] [--database DATABASE] [--fake]
[--fake-initial] [--run-syncdb]
[app_label] [migration_name]
manage.py migrate: error: unrecognized arguments: --list
But even after that, When I am trying to migrate usinng this commannd
但即使在那之后,当我试图迁移使用这个指挥官时
python3 manage.py migrate
python3 manage.py migrate
it gives no error.
它没有错误。
The only issue arises when I am trying to use the list command.So any advice will be much helpful for me.Thanks.
当我尝试使用list命令时,唯一的问题就出现了。所以任何建议对我都有帮助。谢谢。
P.S. I am using Python 3.5.2
附:我使用的是Python 3.5.2
1 个解决方案
#1
11
According to the Django documentation, you should use "showmigrations". It can be used with django-admin:
根据Django文档,您应该使用“showmigrations”。它可以与django-admin一起使用:
django-admin showmigrations
Or with manage.py
或者使用manage.py
python manage.py showmigrations
#1
11
According to the Django documentation, you should use "showmigrations". It can be used with django-admin:
根据Django文档,您应该使用“showmigrations”。它可以与django-admin一起使用:
django-admin showmigrations
Or with manage.py
或者使用manage.py
python manage.py showmigrations