CLI tool to install and add packages to Django in INSTALLED_APPS
Project description
django-include-apps
django-include-apps is a CLI tool to help you manage Django apps in the INSTALLED_APPS list in your Django project's settings.py file. This tool simplifies the process of adding new apps by ensuring they are properly installed and integrated into your Django project.
Features
- Automatically search for settings.py in the current or specified directory.
- Check if the package is installed; if not, prompt the user to install it.
- Verify if the package is related to Django before adding it to INSTALLED_APPS.
- Only Add the new app to the INSTALLED_APPS list if it's not already present.
Installation.
You can install django-include-apps via pip:
pip install django-include-apps
Usage
Basic Command
To add a new app to INSTALLED_APPS, use the following command:
django-include-apps add_app <new_app>
Replace <new_app> with the name of the Django app you want to add.
Options:
Use --start-dir or -d to specify the directory to search for settings.py. Defaults to the current directory if not provided.
Examples:
Example 1: settings.py in the Current Directory
Suppose your Django project's settings.py file is in the current working directory. Navigate to your project directory:
cd /path/to/your/django/project
Run the CLI command to add a new app:
django-include-apps add_app my_new_app
Example 2: settings.py in a Different Directory
Suppose your Django project's settings.py file is in a different directory, such as /path/to/your/django/project/config. Navigate to your desired starting directory:
cd /path/to/your/django/project
Run the CLI command with the --start-dir or -d option:
django-include-apps add_app my_new_app --start-dir ./config
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_include_apps-0.1.0.tar.gz
.
File metadata
- Download URL: django_include_apps-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d674d980c9eb218a31ce168653bd3b3f13bd872df7bdc7ee910ef85eac38c553 |
|
MD5 | 4dbcec5f69cbf46dc2ae9a33b1481edb |
|
BLAKE2b-256 | 2a49541dc2db8ceea0fcd8b76c9cda308341c4dcc330a7da3916e36ca5794ef9 |
File details
Details for the file django_include_apps-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_include_apps-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81f44577e20b5f2338409c53c665d2bbe9eb6cb274ca17557caeea8a58e020dc |
|
MD5 | a049dbcab3f042502fd463964e0bd1d1 |
|
BLAKE2b-256 | c2548f8c6025cbf2574a1e2f11a7d26386fee8094576979d9d698272c216605b |