You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, we have used an alternative approach where we inject our custom commands into our own cli with overwritten fetch_command and main_help_text methods on the LitManagementUtility (which provides the litdjango cli).
This implementation breaks the functions found at:
from django.core.management import get_commands, find_commands, call_command
which are mostly used internally and for testing in django.
In Django, a command is an argument to the
django-admin
ormanage.py
cli's which exposes some functionality.Commands are defined with classes which subclass
django.core.management.base.BaseCommand
.In order to be discoverable by django, the commands must also be defined using the following file-directory pattern 1:
The core commands distributed with django are defined in this manner at
django.core.management.commands
.At present, we have used an alternative approach where we inject our custom commands into our own cli with overwritten
fetch_command
andmain_help_text
methods on theLitManagementUtility
(which provides thelitdjango
cli).This implementation breaks the functions found at:
which are mostly used internally and for testing in django.
We should probably refactor this at some point.
Resources
Footnotes
Django documentation - How to create custom django-admin commands ↩
The text was updated successfully, but these errors were encountered: