Skip to main content

My collection of things for working with Django.

Project description

My collection of things for working with Django.

Latest release 20241111: Rename DjangoBaseCommand to just BaseCommand so that we go from cs.djutils import BaseCommand. Less confusing.

Class BaseCommand(cs.cmdutils.BaseCommand, django.core.management.base.BaseCommand)

A drop in class for django.core.management.base.BaseCommand which subclasses cs.cmdutils.BaseCommand.

This lets me write management commands more easily, particularly if there are subcommands.

Usage summary:

Usage: base [common-options...] [options...]
  A drop in class for `django.core.management.base.BaseCommand`
  which subclasses `cs.cmdutils.BaseCommand`.
  Subcommands:
    help [common-options...] [-l] [subcommand-names...]
      Print help for subcommands.
      This outputs the full help for the named subcommands,
      or the short help for all subcommands if no names are specified.
      -l  Long help even if no subcommand-names provided.
    info [common-options...] [field-names...]
      Recite general information.
      Explicit field names may be provided to override the default listing.
    shell [common-options...]
      Run a command prompt via cmd.Cmd using this command's subcommands.

BaseCommand.add_arguments(self, parser): Add the Options.COMMON_OPT_SPECS to the argparse parser. This is basicly to support the Django call_command function.

BaseCommand.handle(*, argv, **options): The Django BaseComand.handle method. This creates another instance for argv and runs it.

BaseCommand.run_from_argv(argv): Intercept django.core.management.base.BaseCommand.run_from_argv. Construct an instance of cs.djutils.DjangoBaseCommand and run it.

Release Log

Release 20241111: Rename DjangoBaseCommand to just BaseCommand so that we go from cs.djutils import BaseCommand. Less confusing.

Release 20241110: Initial PyPI release with DjangoBaseCommand, cs.cmdutils.BaseCommand subclass suppplanting django.core.management.base.BaseCommand.

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

cs_djutils-20241111.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs.djutils-20241111-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file cs_djutils-20241111.tar.gz.

File metadata

  • Download URL: cs_djutils-20241111.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for cs_djutils-20241111.tar.gz
Algorithm Hash digest
SHA256 e339300dc2f91ca6b33172876ba476a82987862c0a3b4da82d3b1fadb95b8b00
MD5 ac907d6206dee23fe06144b56d61a6eb
BLAKE2b-256 50fec55e6b099b03e4a96b851cba2c40dc455a4918749e989edd799b2d130b0d

See more details on using hashes here.

File details

Details for the file cs.djutils-20241111-py3-none-any.whl.

File metadata

  • Download URL: cs.djutils-20241111-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for cs.djutils-20241111-py3-none-any.whl
Algorithm Hash digest
SHA256 4c6387bcf06bf0f24732ba28fd2fd926f1878fd6ad300217b13dc398f462ce63
MD5 bf367b3f61c8a345ecf3c1d8239b2bfc
BLAKE2b-256 2b8a5a6a0aaa13bca19de1dfb1c7783b476633f0ae3ea78ed44c4fd5ab9912ba

See more details on using hashes here.

Supported by

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