Have a django command
Project description
Django includes the django-admin command. They prefer to not include multiple ways to do the same thing, but I really want to spell it django. I also wanted to be able to configure a default settings module in a configuration file.
Usage
pip install django-cmd
django startproject
Once installed, you can use the django command the same as you would normally use the django-admin command.
Replace manage.py
Did you know that the manage.py script is just a thin wrapper around the django-admin command? All the wrapper does is set DJANGO_SETTINGS_MODULE so that it can load your settings and find any additional commands from your installed apps. With a tiny bit of configuration, you can use this django command in place of python manage.py!
In your pyproject.toml file, add a section like this to configure your default settings module:
[tool.django]
settings_module = "myproject.settings"
Or add a section like this to a setup.cfg file:
[django]
settings_module = myproject.settings
Now you can also use the django command everywhere you would normally use python manage.py:
django runserver
django migrate
django createsuperuser
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
Built Distribution
File details
Details for the file django_cmd-2.6.tar.gz
.
File metadata
- Download URL: django_cmd-2.6.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9aff64e301def57a0aeb1836bf7aaff9d6a5d501dadaa4cf1c23e50701edd3c7
|
|
MD5 |
bb769e52da8013583e0b0cbf237cc613
|
|
BLAKE2b-256 |
3f170f0b3cbb7da5225f6693d0f2bbc54a39d82fe6d658dbfb928e2cfc4cb0f0
|
Provenance
The following attestation bundles were made for django_cmd-2.6.tar.gz
:
Publisher:
publish.yml
on ryanhiebert/django-cmd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_cmd-2.6.tar.gz
-
Subject digest:
9aff64e301def57a0aeb1836bf7aaff9d6a5d501dadaa4cf1c23e50701edd3c7
- Sigstore transparency entry: 161587641
- Sigstore integration time:
-
Permalink:
ryanhiebert/django-cmd@2f4749fb6f397c1e84df5b6a3b6a9cf0d4dc4154
-
Branch / Tag:
refs/tags/2.6
- Owner: https://github.com/ryanhiebert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@2f4749fb6f397c1e84df5b6a3b6a9cf0d4dc4154
-
Trigger Event:
release
-
Statement type:
File details
Details for the file django_cmd-2.6-py3-none-any.whl
.
File metadata
- Download URL: django_cmd-2.6-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b36e8ffc0ac8e3830eeaaf03dc19a3e9db4b2632dc4246c84c896b4270e12c2d
|
|
MD5 |
d26f70db0f0c0e195ee53d9fa0ba0307
|
|
BLAKE2b-256 |
0659978dfd616745424a06f442bd67565d5a6d0e757de3450fd0c3bdf16f035c
|
Provenance
The following attestation bundles were made for django_cmd-2.6-py3-none-any.whl
:
Publisher:
publish.yml
on ryanhiebert/django-cmd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_cmd-2.6-py3-none-any.whl
-
Subject digest:
b36e8ffc0ac8e3830eeaaf03dc19a3e9db4b2632dc4246c84c896b4270e12c2d
- Sigstore transparency entry: 161587642
- Sigstore integration time:
-
Permalink:
ryanhiebert/django-cmd@2f4749fb6f397c1e84df5b6a3b6a9cf0d4dc4154
-
Branch / Tag:
refs/tags/2.6
- Owner: https://github.com/ryanhiebert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@2f4749fb6f397c1e84df5b6a3b6a9cf0d4dc4154
-
Trigger Event:
release
-
Statement type: