A Django app (custom) that modifies the startapp command to ensure all apps are created inside a directory defined by DEFAULT_APPS_DIR in settings.py.
Project description
Django Create App
This Django package customizes the startapp command to create new apps inside a directory specified by the DEFAULT_APPS_DIR setting in your settings.py. This ensures that all your Django apps are neatly organized within a designated folder structure, helping you maintain a cleaner project structure.
Features
- Modifies the
startappcommand to create apps inside a configurable directory (DEFAULT_APPS_DIR) insettings.py. - Simplifies managing apps within large Django projects by keeping them inside a specific directory.
- Reduces the need to manually move apps after they are created.
Installation
To install the package, add it to your project’s requirements.txt or run the following command:
pip install django-create-app
Configuration
-
Install the
django-create-applike any python packages.pip install django-create-app
-
Update
settings.pyAdd
DEFAULT_APPS_DIRvariable inside your settings.py. This will define the directory where all the apps are to be included. If you left undeclared, "apps" will be used by default.# settings.py ... DEFAULT_APPS_DIR = "apps" ...
-
Now, you can use modified
startappcommand to create new apps insideDEFAULT_APPS_DIRdirectory.
Further Configuration
By Default, django-create-app adds DEFAULT_APPS_DIR at the end of the sys.path but sometime we need to add it to different index. For such case, create DEFAULT_APP_DIR_INDEX variable and assign the index at which the DEFAULT_APPS_DIR is inserted.
Example,
DEFAULT_APPS_DIR = "apps"
DEFAULT_APPS_DIR_INDEX = 0 # This causes python to look for any modules or packages inside "apps" directory first.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_create_app-1.0.1.tar.gz.
File metadata
- Download URL: django_create_app-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31bc99ca68507760c4527acd8ee3f344d824299bb5d2b6852585d4137579660b
|
|
| MD5 |
c4ae2aafb0a2a9daed2b8e1e6378e56e
|
|
| BLAKE2b-256 |
d9904f379348418d42ac80b21f734bfa89135b4fc5d926af3387d08b9c0fff6f
|
File details
Details for the file django_create_app-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_create_app-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80889e575fcd9683ab3c25f037a1269184499587a2c9c5a38368fc6ab4b01a34
|
|
| MD5 |
edbab159a55f939cd117e0b2a09c4ae1
|
|
| BLAKE2b-256 |
d092c0dc9fb463020bca3430e79dd2318841bd7f8555a07b4d270735cc9d2f77
|