Skip to main content

Django Custom Commands

A Django package which allows specifying custom paths to load managenent commands from. This allows loading management commands which are not in Django apps.

Installation

pip install django-custom-commands

Usage

There's two things you need to do to use this package:

  1. Import call_command, get_commands and execute_from_command_line from django_custom_commands.management instead of django.core.management.
  2. Define a CUSTOM_COMMAND_LOCATIONS setting in your settings.

The CUSTOM_COMMAND_LOCATIONS should be a list of strings, where each string points to a module where commands can appear. The string should be a dotted path, similar to how apps are defined. The package will then try to load commands from .management.commands in those modules. For example if you have a command in src.demo.management.commands, but you can't/don't want to make src.demo a Django app, you would configure CUSTOM_COMMAND_LOCATIONS = ["src.demo"].

Running tests

poetry run pytest

Release files for django-custom-commands 0.1.0

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

Source distribution (sdist)

Source distribution for django-custom-commands 0.1.0
File Size Uploaded
django_custom_commands-0.1.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-custom-commands 0.1.0
File Interpreter ABI Platform
django_custom_commands-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / django_custom_commands-0.1.0.tar.gz

Download URL django_custom_commands-0.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97bd7b8a76ef499a8f155784c6b3e41582272479ea44ebe1e57cec8396731ce6
BLAKE2b-256 checksum
How to use checksums
5fcf6b3dd421e304b8420b0b246794b712d582dfbfd061ea7aa0f05295bffa9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2024.

Transparency log

Release files / django_custom_commands-0.1.0-py3-none-any.whl

Download URL django_custom_commands-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76f6e22b953adcac2797dd6d8f4e0c931ee08ad568f2dd114503c5f42cfd311e
BLAKE2b-256 checksum
How to use checksums
16cbf9f2082ec3ca959c5369b8b838756f96c6d5d1a2d0d33255556c5d7973e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

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