Browse Source

Enhanced docs and docctrings added in 869c9ba.

Thanks Claude for the suggestion.
Ramiro Morales 12 years ago
parent
commit
21ea58b8cc
3 changed files with 19 additions and 17 deletions
  1. 5 4
      django/core/management/base.py
  2. 7 7
      docs/howto/custom-management-commands.txt
  3. 7 6
      docs/releases/1.6.txt

+ 5 - 4
django/core/management/base.py

@@ -151,10 +151,11 @@ class BaseCommand(object):
         Default value is ``False``.
 
         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 content that is locale-sensitive (like permissions) and that
-        content shouldn't contain any translations so making the locale differ
-        from the de facto default 'en-us' can cause unintended effects.
+        of this option in your custom command if it creates database content
+        that is locale-sensitive and such content shouldn't contain any
+        translations (like it happens e.g. with django.contrim.auth
+        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
         to False too because attempting to set the locale needs access to

+ 7 - 7
docs/howto/custom-management-commands.txt

@@ -118,7 +118,7 @@ Management commands and locales
 ===============================
 
 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
 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``.
 
   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
-  content that is locale-sensitive (like permissions) and that content
-  shouldn't contain any translations so making the locale differ from the de
-  facto default 'en-us' can cause unintended effects. See the `Management
-  commands and locales`_ section above for further details.
+  this option in your custom command if it creates database content that
+  is locale-sensitive and such content shouldn't contain any translations (like
+  it happens e.g. with django.contrim.auth permissions) as making the locale
+  differ from the de facto default 'en-us' might cause unintended effects. See
+  the `Management commands and locales`_ section above for further details.
 
   This option can't be ``False`` when the
   :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
 
-    The ``leave_locale_alone`` option was added in Django 1.6.
+The ``leave_locale_alone`` option was added in Django 1.6.
 
 Methods
 -------

+ 7 - 6
docs/releases/1.6.txt

@@ -39,13 +39,14 @@ Minor features
   <lazy-plural-translations>` can be provided at translation time rather than
   at definition time.
 
-* For custom managemente commands: Validation of the presence of valid settings
-  in managements commands that ask for it by using the
+* For custom management commands: Verification of the presence of valid
+  settings in commands that ask for it by using the
   :attr:`~django.core.management.BaseCommand.can_import_settings` internal
-  option is now performed independently from handling of the locale that should
-  active during the execution of the command. The latter can now be influenced
-  by the new :attr:`~django.core.management.BaseCommand.leave_locale_alone`
-  internal option. See :ref:`management-commands-and-locales` for more details.
+  option is now performed independently from handling of the locale that
+  should be active during the execution of the command. The latter can now be
+  influenced by the new
+  :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
 =====================================