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:
- Import
call_command,get_commandsandexecute_from_command_linefromdjango_custom_commands.managementinstead ofdjango.core.management. - Define a
CUSTOM_COMMAND_LOCATIONSsetting 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
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_custom_commands-0.1.0.tar.gz | 4.0 kB | With provenance | Details for django_custom_commands-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_custom_commands-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for django_custom_commands-0.1.0-py3-none-any.whl |
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 logRelease 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 logSecurity for django-custom-commands 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_custom_commands-0.1.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.