[Django] #29448: Create management command management command

3 views
Skip to first unread message

Django

unread,
May 26, 2018, 10:07:02 AM5/26/18
to django-...@googlegroups.com
#29448: Create management command management command
-------------------------------------+-------------------------------------
Reporter: Katie | Owner: Katie McLaughlin
McLaughlin |
Type: New | Status: assigned
feature |
Component: Core | Version: 2.0
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
There already exists a startproject for creating projects using a
template, and startapp for apps.

This feature would create a management command, using itself a management
command.

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

Django

unread,
May 26, 2018, 10:18:21 AM5/26/18
to django-...@googlegroups.com
#29448: Create management command management command
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
| McLaughlin
Type: New feature | Status: assigned
Component: Core (Management | Version: 2.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam (Chainz) Johnson):

* cc: Adam (Chainz) Johnson (added)


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

Django

unread,
Jun 1, 2018, 5:02:10 PM6/1/18
to django-...@googlegroups.com
#29448: Create management command management command
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
| McLaughlin
Type: New feature | Status: assigned
Component: Core (Management | Version: 2.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

I'm not very thrilled by the idea. We already have detailed instructions
in the docs (https://docs.djangoproject.com/en/2.0/howto/custom-
management-commands/).

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

Django

unread,
Jun 8, 2018, 3:33:44 AM6/8/18
to django-...@googlegroups.com
#29448: Create management command management command
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
| McLaughlin
Type: New feature | Status: closed

Component: Core (Management | Version: 2.0
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

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


Comment:

I feel this one.

It's not that the instructions are good/correct, it's that "Ooo, I can
make a management command" leads straight to, "Oh, I have to create a
folder, and an `__init__.py`, Oh and another folder, Oh and another
`__init__.py`.

And then it's, "Oh, hang on, what are the imports?" and "What do I have to
subclass?" and "What methods do I need to implement?".

It's a real pain.

I'm going to say `wontfix` on this though, since [https://django-
extensions.readthedocs.io/en/latest/command_extensions.html Django
Extensions already implements a `create_command` command], which sets up
the folders and puts a command scaffolding in ([https://github.com/django-
extensions/django-
extensions/blob/master/django_extensions/conf/command_template/management/commands/sample.py.tmpl
that looks like this]).

That does the job perfectly. I don't think we can improve.

_Maybe_ pulling it into core, but the whole point of Django Extensions is
that useful stuff lives there that we haven't (and may or may not pull
in). As a community we should make sure users know it exists, since it's
great.

I hope that's fair. Katie, if you still think, "Yes, this should be in
core" then please follow up on Django Developers and we can discuss.

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

Django

unread,
Jun 8, 2018, 3:38:21 AM6/8/18
to django-...@googlegroups.com
#29448: Create management command management command
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
| McLaughlin
Type: New feature | Status: closed
Component: Core (Management | Version: 2.0
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Katie McLaughlin):

Replying to [comment:3 Carlton Gibson]:

> I hope that's fair.

Totally fair.

> Django Extensions

I really need to investigate this one more. I was told in passing "Oh,
Django Extensions does that" (in the context of something else), but
without knowing what Django Extensions *is*, where it sits in the
ecosystem, and realising it's purpose, I totally accept that this issue is
outside of scope of core.

--
Ticket URL: <https://code.djangoproject.com/ticket/29448#comment:4>

Reply all
Reply to author
Forward
0 new messages