Skip to main content

CLI tool to install and add packages to Django in INSTALLED_APPS

Project description

django-include-apps

=====================================

PyPI version Downloads License

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.

Project Link

For more details, visit the PyPI project page

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 /path/to/dir

Example 3: multiple python packages in a single line

Suppose you want to install and include multiple packages and apps to Django project's settings.py file you can use this CLI.

cd /path/to/your/django/project

Run the CLI command with the --start-dir or -d option:

django-include-apps add_apps <my_new_app1> <my_new_app2> <my_new_app3> --start-dir /path/to/dir

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

django_include_apps-0.1.2.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

django_include_apps-0.1.2.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file django_include_apps-0.1.2.1.tar.gz.

File metadata

  • Download URL: django_include_apps-0.1.2.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for django_include_apps-0.1.2.1.tar.gz
Algorithm Hash digest
SHA256 ecfb80e39fe8bc9aea1dc25aa52525c78288ff34b95c91ed2f3f14e9e5c05ee1
MD5 658f919408302a4707f18fc3d5e716e2
BLAKE2b-256 b5d01d1ed79ff5823a59dae628ddb659f8dbfc473a1b4b28ce19b1310a9f3f54

See more details on using hashes here.

File details

Details for the file django_include_apps-0.1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_include_apps-0.1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5fb85428a4fe370013f3470f324dda21502b3003d73496dc47fab395d765bf4
MD5 5adebf7213e97f88b9b95c0c8c08339f
BLAKE2b-256 7093284c7bdea2c124e81cb969c5658f7fda41e8b7702f1cd7f90c84c6f69da3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page