Metadata-Version: 2.1
Name: django-include-apps
Version: 0.1.1
Summary: CLI tool to install and add packages to Django in INSTALLED_APPS
Home-page: https://github.com/Rohan7654/django-include-apps.git
Author: ROHAN
Author-email: rohanroni2019@gmail.com
License: MIT
Keywords: django-include-apps django add apps cli
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: Django
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer
Requires-Dist: requests
Requires-Dist: inquirer

# django-include-apps
=====================================

[![PyPI version](https://badge.fury.io/py/django-include-apps.svg)](https://badge.fury.io/py/django-include-apps)
[![Downloads](https://pepy.tech/badge/django-include-apps)](https://pypi.org/project/django-include-apps/0.1.0/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](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:
```python
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](https://pypi.org/project/django-include-apps/0.1.0/)


# 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:
```sh
cd /path/to/your/django/project
```
Run the CLI command to add a new app:

```python
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:
```sh
cd /path/to/your/django/project
```
Run the CLI command with the --start-dir or -d option:
```python
django-include-apps add_app my_new_app --start-dir ./config
```
