Opened 16 minutes ago
#37580 new Cleanup/optimization
Clarify phrasing of "only Django core commands are listed" note
| Reported by: | Valgarður | Owned by: | |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | dev |
| Severity: | Low | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
When settings can't be loaded, django-admin help shows:
Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).
"listed as settings" reads as a single phrase, so the reader must backtrack to realise "as" means "because". The parenthetical also produces doubled punctuation (settings.).), since the inner error ends with its own full stop. I propose changing the phrasing to something like:
Note that only Django core commands are listed because settings are not properly configured: [err]
This is possibly out of scope, but the message as a whole is hard to follow. I imagine running django-admin help is a common case for newcomers, in which case the error is a false alarm. It could be a warning suggesting either creating a project with something like django-admin startproject, or running their manage.py.