Difference between revisions of "Django Management command"

From RHS Wiki
Jump to navigation Jump to search
(Created page with "app_dir/management/commands/cmdname.py<syntaxhighlight lang="python3"> from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): def...")
Tag: visualeditor
(No difference)

Revision as of 08:36, 27 April 2020

app_dir/management/commands/cmdname.py

from django.core.management.base import BaseCommand, CommandError


class Command(BaseCommand):
    def add_arguments(self, parser):
        pass

    def handle(self, *args, **options):
        pass