[Django] #33444: Can "Do you rename" questioner can be executed with a default or optional parameter (y/N) ?

2 views
Skip to first unread message

Django

unread,
Jan 16, 2022, 7:31:14 AMJan 16
to django-...@googlegroups.com
#33444: Can "Do you rename" questioner can be executed with a default or optional
parameter (y/N) ?
-----------------------------------------+---------------------------
Reporter: liudaoqiangtj | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 3.2
Severity: Normal | Keywords: --noinput
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+---------------------------
I am in Django 3.2.6.I execute the command after I rename a field in my
table:
"python manage.py makemigrations", I got a raised questioner with "Do you
rename book.title to book.content (a BinaryField)? [y/N]? ",
it required a command input "y", but I want to make a default param "y"
in this command .
Is there any plan to make a supplement to add a default or optional
paramter instead of a questioner of [y/N]?

--
Ticket URL: <https://code.djangoproject.com/ticket/33444>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 16, 2022, 7:23:29 PMJan 16
to django-...@googlegroups.com
#33444: Can "Do you rename" questioner can be executed with a default or optional
parameter (y/N) ?
-------------------------------+--------------------------------------

Reporter: liudaoqiangtj | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 3.2
Severity: Normal | Resolution:

Keywords: --noinput | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by alchermd):

The existing flag "--no-input" seems to fit the bill here. Is there a
reason why you think a separate parameter is a good idea?

--
Ticket URL: <https://code.djangoproject.com/ticket/33444#comment:1>

Django

unread,
Jan 17, 2022, 12:15:11 AMJan 17
to django-...@googlegroups.com
#33444: Add an option with default answer for makemigrations questions.
-------------------------------+--------------------------------------
Reporter: liudaoqiangtj | Owner: nobody
Type: New feature | Status: closed
Component: Migrations | Version: 3.2
Severity: Normal | Resolution: wontfix

Keywords: --noinput | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

Thanks for this ticket, however I don't see a need for a new option. If
you really want to answer `yes` to all the questions, you can use a
separate command e.g. `yes` on Linux
{{{
$ yes | django-admin makemigrations
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33444#comment:2>

Django

unread,
Jan 17, 2022, 9:37:11 AMJan 17
to django-...@googlegroups.com
#33444: Add an option with default answer for makemigrations questions.
-------------------------------+--------------------------------------
Reporter: liudaoqiangtj | Owner: nobody
Type: New feature | Status: closed
Component: Migrations | Version: 3.2
Severity: Normal | Resolution: wontfix

Keywords: --noinput | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by liudaoqiangtj):

Thank you for your immediate relpy, I really appreciate it.
I am in a mini team and a initial project, we use a excel file and a
python script to auto edit models.py , aims to manage our database tables
and fields.
In the present condition, it can be efficient for us to make "python
manage.py makemigrations (and migrate)" automaticly on the server , and
another benefit is that it helps to avoid some migration conflicts.

--
Ticket URL: <https://code.djangoproject.com/ticket/33444#comment:3>

Reply all
Reply to author
Forward
0 new messages