Django

Code

Ticket #8120 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

manage.py help subcommand and --settings

Reported by: Scott Moonen <smoonen@andstuff.org> Assigned to: nobody
Milestone: Component: Uncategorized
Version: SVN Keywords: manage.py settings DJANGO_SETTINGS_MODULE help
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation:
Needs tests: Patch needs improvement:

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.)

2. 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).

Attachments

Change History

08/08/08 08:40:12 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(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@andstuff.org> and trevor for the respective reports.


Add/Change #8120 (manage.py help subcommand and --settings)




Change Properties
Action