diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-07 18:04:00 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-07 18:09:15 -0400 |
| commit | c379fc4eec885101ac30e0505f967048c869e630 (patch) | |
| tree | 86c9609daf11fd5bb4d3251ec9fdee4c622d4651 | |
| parent | 5acb0a913997aea83dbbf272bcc97f67a25a32c4 (diff) | |
[1.7.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
| -rw-r--r-- | docs/howto/custom-management-commands.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index 247dfa620c..6e661f6596 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`. |
