Skip to main content

Django subcommands

Project description

Installation

$ [sudo] pip install django-subcommands

Classes

class __doc__
django_subcommands.SubCommands SubCommands class. attrs: subcommands (dict)

Examples

management/commands/command.py

from django.core.management.base import BaseCommand
import django_subcommands

class SubCommand1(BaseCommand):
    def handle(self, *args, **options):
        ...

class SubCommand2(BaseCommand):
    def handle(self, *args, **options):
        ...

class Command(django_subcommands.SubCommands):
    subcommands = {"subcommand1": SubCommand1,"subcommand2":SubCommand2}
$ python manage.py command subcommand1

django-readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-subcommands, version 2019.4.13
Filename, size File type Python version Upload date Hashes
Filename, size django-subcommands-2019.4.13.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page