Opened 16 years ago

Closed 16 years ago

#8120 closed (fixed)

manage.py help subcommand and --settings

Reported by: Scott Moonen <smoonen@…> Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords: manage.py 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

Description

I'm experiencing two problems with manage.py:

  1. manage.py 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 "manage.py 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 manage.py, 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 manage.py 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 http://groups.google.com/group/django-developers/browse_thread/thread/86bbf7e446d5e60f (thanks Russ).

Change History (1)

comment:1 by Russell Keith-Magee, 16 years ago

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