manage.py help subcommand and --settings
|Reported by:||Scott Moonen <smoonen@…>||Owned by:||nobody|
|Severity:||Keywords:||manage.py settings DJANGO_SETTINGS_MODULE help|
|Has patch:||no||Needs documentation:|
|Needs tests:||Patch needs improvement:|
I'm experiencing two problems with manage.py:
- 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.)
- 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).