From 54546cee88f1db4e7e0ad75ebb9672c118b2236c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 7 Jul 2014 18:04:00 -0400 Subject: [PATCH] Fixed #22942 -- Noted that __init__.py files are required for management command detection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Diego Cerdán for the suggestion. --- docs/howto/custom-management-commands.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index da88df7f1b..db03f1e51f 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`.