Welcome to django commnads’s documentation!

Usage

  1. pip install

pip install django-commands2
  1. add django_commands to INSTALLED_APPS, and logging

INSTALLED_APPS = [
    'django_commands',
]
LOGGING = {
    "loggers": {
        "django_commands": {
            # ...your custom level, handles config...
        }
    }
}
DJANGO_COMMANDS_ALLOW_REMOTE_CALL = [
    "slow_command",  # add slow_command if you want to run unittest
    <your command>
]
  1. add url config like:

path('api/django-commands/', include("django_commands.urls")),
  1. Call Command from url

Indices and tables

API Reference

Commands

Mixin