Opened 10 years ago

Closed 10 years ago

#23447 closed Uncategorized (worksforme)

Migrate management command doesn't follow documentation "Running management commands from your code"

Reported by: thenewguy Owned by: nobody
Component: Core (Management commands) Version: 1.7
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According to the documentation at https://docs.djangoproject.com/en/1.7/ref/django-admin/#running-management-commands-from-your-code migrate can be called non-interactively with call_command("migrate", noinput=True) but this doesn't work. It must be run as call_command("migrate", interactive=False)

Change History (1)

comment:1 by Tim Graham, 10 years ago

Resolution: worksforme
Status: newclosed

I'm not seeing where it's implied that the call_command option is noinput=True. The example for flush is management.call_command('flush', verbosity=0, interactive=False).

Also, call_command("migrate", noinput=True) will work in Django 1.8 now (see #22985) and I don't think it's worth adding additional documentation for 1.7 since this issue has existed for a long time (although feel free to reopen if you'd like to provide a patch).

Note: See TracTickets for help on using tickets.
Back to Top