Opened 10 years ago

Closed 10 years ago

#8120 closed (fixed) help subcommand and --settings

Reported by: Scott Moonen <smoonen@…> Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords: settings DJANGO_SETTINGS_MODULE help
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'm experiencing two problems with

  1. help does not document the use of the --settings option. Instead, this option is documented on individual subcommand helps. However, this option in particular is important enough that I think it should be documented up front on the main help output. (The same might actually apply to most of the other common options like pythonpath, traceback, etc.)
  1. If I need to specify my own settings file (for example, I'm using a three-component path like 'apps.myapp.settings'), I can't even run " help" without specifying --settings; it produces an import error. So I have no way of knowing that --settings is the right option to use in order to invoke, since I can't even invoke the help subcommand.

Both of these problems get at the fact that, if you're using a nonstandard settings path, it is excessively hard to discover that --settings is available to you to workaround this. In the first case, it isn't obvious that a settings option is available. In the second case, help itself isn't even available.

I would suggest modifying so that 1) help can be run even on settings import failure, and 2) the main help output advertises the availability of global options such as --settings.

See also (thanks Russ).

Change History (1)

comment:1 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [8228]) Fixed #8120, #7997 -- Cleaned up the help messages displayed by django-admin so that the lax options aren't repeated, and the lax options are displayed when no subcommand is provided. Thanks to Scott Moonen <smoonen@…> and trevor for the respective reports.

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