# 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.2.1/)
[![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.2.1/)
# 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 /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.
```sh
cd /path/to/your/django/project
```
Run the CLI command with the --start-dir or -d option:
```python
django-include-apps add_apps <my_new_app1> <my_new_app2> <my_new_app3> --start-dir /path/to/dir
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Rohan7654/django-include-apps.git",
"name": "django-include-apps",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "django-include-apps django add apps cli",
"author": "ROHAN",
"author_email": "rohanroni2019@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b5/d0/1d1ed79ff5823a59dae628ddb659f8dbfc473a1b4b28ce19b1310a9f3f54/django_include_apps-0.1.2.1.tar.gz",
"platform": null,
"description": "# django-include-apps\n=====================================\n\n[![PyPI version](https://badge.fury.io/py/django-include-apps.svg)](https://badge.fury.io/py/django-include-apps)\n[![Downloads](https://pepy.tech/badge/django-include-apps)](https://pypi.org/project/django-include-apps/0.1.2.1/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n**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.\n\n# Features\n- Automatically search for settings.py in the current or specified directory.\n- Check if the package is installed; if not, prompt the user to install it.\n- Verify if the package is related to Django before adding it to **INSTALLED_APPS**.\n- Only Add the new app to the INSTALLED_APPS list if it's not already present.\n\n# Installation.\nYou can install django-include-apps via pip:\n```python\npip install django-include-apps\n```\n\n# Usage\n## Basic Command\nTo add a new app to INSTALLED_APPS, use the following command:\n\n```\ndjango-include-apps add_app <new_app>\n```\nReplace **<new_app>** with the name of the Django app you want to add.\n\n# Project Link\nFor more details, visit the [PyPI project page](https://pypi.org/project/django-include-apps/0.1.2.1/)\n\n\n# Options:\nUse **--start-dir** or **-d** to specify the directory to search for settings.py. Defaults to the current directory if not provided.\n\n\n# Examples:\n## Example 1: settings.py in the Current Directory\nSuppose your Django project's settings.py file is in the current working directory.\nNavigate to your project directory:\n```sh\ncd /path/to/your/django/project\n```\nRun the CLI command to add a new app:\n\n```python\ndjango-include-apps add_app <my_new_app>\n ```\n\n## Example 2: settings.py in a Different Directory\nSuppose your Django project's settings.py file is in a different directory, such as /path/to/your/django/project/config.\nNavigate to your desired starting directory:\n```sh\ncd /path/to/your/django/project\n```\nRun the CLI command with the --start-dir or -d option:\n```python\ndjango-include-apps add_app <my_new_app> --start-dir /path/to/dir\n```\n\n## Example 3: multiple python packages in a single line\nSuppose you want to install and include multiple packages and apps to Django project's settings.py file you can use this CLI.\n```sh\ncd /path/to/your/django/project\n```\nRun the CLI command with the --start-dir or -d option:\n```python\ndjango-include-apps add_apps <my_new_app1> <my_new_app2> <my_new_app3> --start-dir /path/to/dir\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI tool to install and add packages to Django in INSTALLED_APPS",
"version": "0.1.2.1",
"project_urls": {
"Homepage": "https://github.com/Rohan7654/django-include-apps.git"
},
"split_keywords": [
"django-include-apps",
"django",
"add",
"apps",
"cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7093284c7bdea2c124e81cb969c5658f7fda41e8b7702f1cd7f90c84c6f69da3",
"md5": "5adebf7213e97f88b9b95c0c8c08339f",
"sha256": "b5fb85428a4fe370013f3470f324dda21502b3003d73496dc47fab395d765bf4"
},
"downloads": -1,
"filename": "django_include_apps-0.1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5adebf7213e97f88b9b95c0c8c08339f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5887,
"upload_time": "2024-07-11T06:18:05",
"upload_time_iso_8601": "2024-07-11T06:18:05.994980Z",
"url": "https://files.pythonhosted.org/packages/70/93/284c7bdea2c124e81cb969c5658f7fda41e8b7702f1cd7f90c84c6f69da3/django_include_apps-0.1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b5d01d1ed79ff5823a59dae628ddb659f8dbfc473a1b4b28ce19b1310a9f3f54",
"md5": "658f919408302a4707f18fc3d5e716e2",
"sha256": "ecfb80e39fe8bc9aea1dc25aa52525c78288ff34b95c91ed2f3f14e9e5c05ee1"
},
"downloads": -1,
"filename": "django_include_apps-0.1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "658f919408302a4707f18fc3d5e716e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5253,
"upload_time": "2024-07-11T06:18:07",
"upload_time_iso_8601": "2024-07-11T06:18:07.903829Z",
"url": "https://files.pythonhosted.org/packages/b5/d0/1d1ed79ff5823a59dae628ddb659f8dbfc473a1b4b28ce19b1310a9f3f54/django_include_apps-0.1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-11 06:18:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Rohan7654",
"github_project": "django-include-apps",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "django-include-apps"
}