Document use of locales in management commands
|Reported by:||gregoire||Owned by:||nobody|
|Severity:||Keywords:||LANCGUAGE_CODE management basecommand en-us|
|Cc:||gregoire@…, django@…, Vlastimil Zíma||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Locale en-us is forced in management commands.
My application does not support en-us and should run its commands as fr, as specified in the settings.
In BaseCommand.execute(), the comment says:
# Switch to English, because django-admin.py creates database content # like permissions, and those shouldn't contain any translations.
I guess that commands requiring en-us should activate it themselves and let everything else working in the expected locale.
Change History (12)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
comment:6 Changed 8 years ago by
|Component:||Internationalization → Documentation|
|Summary:||Management commands should honor LANGUAGE_CODE settings → Document use of locales in management commands|