summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-07-07 18:04:00 -0400
committerTim Graham <timograham@gmail.com>2014-07-07 18:09:22 -0400
commit837cad0f6242f5292b8a4811fc48fbfbefe92a47 (patch)
tree8e436d5279064a0fcc5687e43ee167af29142c9d /docs
parent85f9745807ea0042225aaf4472fb63a00f3e2bcc (diff)
[1.6.x] Fixed #22942 -- Noted that __init__.py files are required for management command detection.
Thanks Diego Cerdán for the suggestion. Backport of 54546cee88 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/custom-management-commands.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
index 2325e32ac2..c5fc7ca06f 100644
--- a/docs/howto/custom-management-commands.txt
+++ b/docs/howto/custom-management-commands.txt
@@ -26,6 +26,10 @@ directory whose name doesn't begin with an underscore. For example::
tests.py
views.py
+On Python 2, be sure to include ``__init__.py`` files in both the
+``management`` and ``management/commands`` directories as done above or your
+command will not be detected.
+
In this example, the ``closepoll`` command will be made available to any project
that includes the ``polls`` application in :setting:`INSTALLED_APPS`.