Skip to main content

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

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.4.13.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file django-subcommands-2019.4.13.tar.gz.

File metadata

  • Download URL: django-subcommands-2019.4.13.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for django-subcommands-2019.4.13.tar.gz
Algorithm Hash digest
SHA256 49926910632cb8043bda0bde35893421508b8a80f401f83e04a690baf9b132e0
MD5 f0f190ae859149f9919a54ecda6f9502
BLAKE2b-256 526dbe3b670ad3c21a70cc1d4e7df45093c805fb2d4b29783fb00c554d40cdeb

See more details on using hashes here.

Release history Release notifications | RSS feed

2020.12.3

1 file

2020.7.1

1 file

This release

2019.4.13 This release

1 file

2019.3.22

2 files

2019.3.13

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page