@@ -124,15 +124,15 @@ Example:
124124
125125``` python
126126MANAGEMENT_COMMANDS_PATHS = {
127- " mycommand " : " mysite.commands.MyCommand" ,
127+ " my-command " : " mysite.commands.MyCommand" ,
128128}
129129```
130130
131- You can now run the custom command ` mycommand ` implemented in the ` MyCommand ` class
131+ You can now run the custom command ` my-command ` implemented in the ` MyCommand ` class
132132from the ` mysite.commands ` module:
133133
134134``` console
135- python manage.py mycommand
135+ python manage.py my-command
136136```
137137
138138> In Django, the class representing a command must be named ` Command ` . The plugin
@@ -141,8 +141,8 @@ python manage.py mycommand
141141
142142** Important Notes:**
143143
144- - All keys and values must be valid Python identifiers and absolute dotted paths,
145- respectively.
144+ - All keys and values must be valid Python identifiers (with hyphens allowed) and
145+ absolute dotted paths, respectively.
146146- Paths must point to command classes, not modules.
147147- Commands must subclass ` django.core.management.base.BaseCommand ` .
148148- This setting takes precedence over others when discovering commands.
@@ -214,26 +214,26 @@ Example:
214214
215215``` python
216216MANAGEMENT_COMMANDS_ALIASES = {
217- " fullcheck " : [
217+ " full-check " : [
218218 " check --fail-level ERROR --deploy" ,
219219 " makemigrations --check --dry-run --no-input" ,
220220 " migrate --no-input" ,
221221 ],
222222}
223223```
224224
225- You can now execute all the commands aliased by ` fullcheck ` with a single command:
225+ You can now execute all the commands aliased by ` full-check ` with a single command:
226226
227227``` console
228- python manage.py fullcheck
228+ python manage.py full-check
229229```
230230
231231Aliases can refer to commands defined in the ` MANAGEMENT_COMMANDS_PATHS ` setting
232232or other aliases.
233233
234234** Important Notes:**
235235
236- - Keys must be valid Python identifiers.
236+ - Keys must be valid Python identifiers (with hyphens allowed) .
237237- Values should be command expressions with parsable arguments and options.
238238- Circular references within aliases are not allowed, as they lead to infinite recursion.
239239
0 commit comments