Skip to main content

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.

Release files for cs-djutils 20241111

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs-djutils 20241111
File Size Uploaded
cs_djutils-20241111.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cs-djutils 20241111
File Interpreter ABI Platform
cs.djutils-20241111-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / cs_djutils-20241111.tar.gz

Download URL cs_djutils-20241111.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e339300dc2f91ca6b33172876ba476a82987862c0a3b4da82d3b1fadb95b8b00
BLAKE2b-256 checksum
How to use checksums
50fec55e6b099b03e4a96b851cba2c40dc455a4918749e989edd799b2d130b0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.6

Release files / cs.djutils-20241111-py3-none-any.whl

Download URL cs.djutils-20241111-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c6387bcf06bf0f24732ba28fd2fd926f1878fd6ad300217b13dc398f462ce63
BLAKE2b-256 checksum
How to use checksums
2b8a5a6a0aaa13bca19de1dfb1c7783b476633f0ae3ea78ed44c4fd5ab9912ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page