#34224: App name in help text of commands is missing context
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Type: New feature | Status: closed
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | 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):
* cc: Aymeric Augustin (added)
* status: new => closed
* resolution: => wontfix
Comment:
Thanks for the ticket, however I have some doubts.
> And I don't think it is reasonable to assume that everybody who deploys
this project will know by heart which of the apps belong to "project" and
which don't.
App names must by unique so there is no way to have two apps with the same
name and you can always check a list of `INSTALLED_APPS` to figure out
where an app comes from.
> I think it would be beneficial to either allow the developer of an app
to decide what is shown here, and/or show the full module/package name (by
default).
You can override `print_help()` (or `help_text`) in your command to
provide additional context when displaying help for a specific command,
this should be enough to provide guidance to users. For example:
{{{#!python
class Command(BaseCommand):
...
def print_help(self, prog_name, subcommand):
sys.stdout.write(f"Command provided by:
{self.__class__.__module__}\n\n")
super().print_help(prog_name, subcommand)
$ python manage.py help inspectdb
Command provided by: django.core.management.commands.inspectdb
usage: manage.py inspectdb [-h] [--database DATABASE] [--include-
partitions] [--include-views] [--version] [-v {0,1,2,3}]
...
}}}
If you don't agree, then please first start a discussion on the
DevelopersMailingList, where you'll reach a wider audience and see what
other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features].
--
Ticket URL: <https://code.djangoproject.com/ticket/34224#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701853ebcd072-e448b178-5153-42bc-8331-c09621383f18-000000%40eu-central-1.amazonses.com.