6

I am working on my first Django Project and while learning about migrations I was to use this command to see the lists.

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

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.

P.S. I am using Python 3.5.2

1 Answer 1

18

According to the Django documentation, you should use "showmigrations". It can be used with django-admin:

django-admin showmigrations

Or with manage.py

python manage.py showmigrations
2
  • Thank you very much.It worked.One thing only.The tutorial in which I saw it used --list.So was it for Python 2 or something?
    – john400
    Feb 2, 2017 at 4:13
  • @john400 from Django version 1.7 to 1.8 it changed, as you can see on the end of the section about "migrate" on the doc for 1.8 version docs.djangoproject.com/en/1.8/ref/django-admin/…
    – fgalvao
    Feb 2, 2017 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.