Enhanced docs and docctrings added in 869c9ba
.
Thanks Claude for the suggestion.
This commit is contained in:
parent
2edef932ff
commit
21ea58b8cc
|
@ -151,10 +151,11 @@ class BaseCommand(object):
|
||||||
Default value is ``False``.
|
Default value is ``False``.
|
||||||
|
|
||||||
Make sure you know what you are doing if you decide to change the value
|
Make sure you know what you are doing if you decide to change the value
|
||||||
of this option in your custom command because many of them create
|
of this option in your custom command if it creates database content
|
||||||
database content that is locale-sensitive (like permissions) and that
|
that is locale-sensitive and such content shouldn't contain any
|
||||||
content shouldn't contain any translations so making the locale differ
|
translations (like it happens e.g. with django.contrim.auth
|
||||||
from the de facto default 'en-us' can cause unintended effects.
|
permissions) as making the locale differ from the de facto default
|
||||||
|
'en-us' might cause unintended effects.
|
||||||
|
|
||||||
This option can't be False when the can_import_settings option is set
|
This option can't be False when the can_import_settings option is set
|
||||||
to False too because attempting to set the locale needs access to
|
to False too because attempting to set the locale needs access to
|
||||||
|
|
|
@ -118,7 +118,7 @@ Management commands and locales
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
By default, the :meth:`BaseCommand.execute` method sets the hardcoded 'en-us'
|
By default, the :meth:`BaseCommand.execute` method sets the hardcoded 'en-us'
|
||||||
locale because most of the commands shipped with Django perform several tasks
|
locale because some commands shipped with Django perform several tasks
|
||||||
(for example, user-facing content rendering and database population) that
|
(for example, user-facing content rendering and database population) that
|
||||||
require a system-neutral string language (for which we use 'en-us').
|
require a system-neutral string language (for which we use 'en-us').
|
||||||
|
|
||||||
|
@ -237,11 +237,11 @@ All attributes can be set in your derived class and can be used in
|
||||||
Default value is ``False``.
|
Default value is ``False``.
|
||||||
|
|
||||||
Make sure you know what you are doing if you decide to change the value of
|
Make sure you know what you are doing if you decide to change the value of
|
||||||
this option in your custom command because many of them create database
|
this option in your custom command if it creates database content that
|
||||||
content that is locale-sensitive (like permissions) and that content
|
is locale-sensitive and such content shouldn't contain any translations (like
|
||||||
shouldn't contain any translations so making the locale differ from the de
|
it happens e.g. with django.contrim.auth permissions) as making the locale
|
||||||
facto default 'en-us' can cause unintended effects. See the `Management
|
differ from the de facto default 'en-us' might cause unintended effects. See
|
||||||
commands and locales`_ section above for further details.
|
the `Management commands and locales`_ section above for further details.
|
||||||
|
|
||||||
This option can't be ``False`` when the
|
This option can't be ``False`` when the
|
||||||
:data:`~BaseCommand.can_import_settings` option is set to ``False`` too
|
:data:`~BaseCommand.can_import_settings` option is set to ``False`` too
|
||||||
|
@ -250,7 +250,7 @@ All attributes can be set in your derived class and can be used in
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
The ``leave_locale_alone`` option was added in Django 1.6.
|
The ``leave_locale_alone`` option was added in Django 1.6.
|
||||||
|
|
||||||
Methods
|
Methods
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -39,13 +39,14 @@ Minor features
|
||||||
<lazy-plural-translations>` can be provided at translation time rather than
|
<lazy-plural-translations>` can be provided at translation time rather than
|
||||||
at definition time.
|
at definition time.
|
||||||
|
|
||||||
* For custom managemente commands: Validation of the presence of valid settings
|
* For custom management commands: Verification of the presence of valid
|
||||||
in managements commands that ask for it by using the
|
settings in commands that ask for it by using the
|
||||||
:attr:`~django.core.management.BaseCommand.can_import_settings` internal
|
:attr:`~django.core.management.BaseCommand.can_import_settings` internal
|
||||||
option is now performed independently from handling of the locale that should
|
option is now performed independently from handling of the locale that
|
||||||
active during the execution of the command. The latter can now be influenced
|
should be active during the execution of the command. The latter can now be
|
||||||
by the new :attr:`~django.core.management.BaseCommand.leave_locale_alone`
|
influenced by the new
|
||||||
internal option. See :ref:`management-commands-and-locales` for more details.
|
:attr:`~django.core.management.BaseCommand.leave_locale_alone` internal
|
||||||
|
option. See :ref:`management-commands-and-locales` for more details.
|
||||||
|
|
||||||
Backwards incompatible changes in 1.6
|
Backwards incompatible changes in 1.6
|
||||||
=====================================
|
=====================================
|
||||||
|
|
Loading…
Reference in New Issue