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.

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.

Supported by

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