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

TODO

  • Support including multiple packages in single command
  • Remove app added to INSTALLED_APPS
  • Auto generate requirements.txt and tracking it.

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.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_include_apps-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 5498d606040ca25e927e05f7cf02b74d4443f6f054a8c8c34bd94d7b7b99aff7
MD5 7a2645db35a006138791d9fed30c0382
BLAKE2b-256 b7aeb6d2320acc95b09d03be83ad5ceb3381bb2603899af995a09666759cbf00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_include_apps-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 011518387aa68378d88b7411c69c354e2db920967347600d0fd07e22bef9fbdd
MD5 ec4dca6b43c9e73e494433ebb8f6cc74
BLAKE2b-256 7cce9551a9f83db79cee70b0ff40b4bbf8e9290e4d56c674a58b7e6ff1ee65b6

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