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

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.

Source Distribution

django-subcommands-2019.3.13.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

django_subcommands-2019.3.13-py2.py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page