#29448 closed New feature (wontfix)
Create management command management command
Reported by: | Katie McLaughlin | Owned by: | Katie McLaughlin |
---|---|---|---|
Component: | Core (Management commands) | Version: | 2.0 |
Severity: | Normal | Keywords: | |
Cc: | Adam Johnson | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (4)
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
follow-up: 4 comment:3 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
I feel this one.
It's not that the instructions are not 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 Django Extensions already implements a `create_command` command, which sets up the folders and puts a command scaffolding in (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.
comment:4 by , 6 years ago
Replying to 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.
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/).