Auto import a module from all yours apps!
Project description
django-app-auto-import
Auto import a module from all yours apps!
Quick Start
# my.project.settings.py AUTO_IMPORT = 'startup' # Automatically imports `startup.py` in all apps
This is a pretty simple library so there is not much more to it.
Preventing Unwanted Code Execution
Through an allow listing:
# my.project.settings.py
AUTO_IMPORT = 'startup' # Automatically imports `startup.py` in all apps
AUTO_IMPORT_ALLOW_LIST = [
'my.project.app.name', # Will only import `my.project.app.name.startup`
]
Through a block list:
# my.project.settings.py
AUTO_IMPORT = 'startup' # Automatically imports `startup.py` in all apps
AUTO_IMPORT_BLOCK_LIST = [
'my.project.app.name', # Won't import `my.project.app.name.startup`
]
Making Changes & Contributing
This project uses pre-commit, please make sure to install it before making any changes:
pip install pre-commit cd django-app-auto-import pre-commit install
It is a good idea to update the hooks to the latest version:
pre-commit autoupdate
Don’t forget to tell your contributors to also install and use pre-commit.
Note
This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.
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_app_auto_import-1.0.1.tar.gz.
File metadata
- Download URL: django_app_auto_import-1.0.1.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2bde16aae1753bb3b60779ffa112e2899bcb0ebec89273c1e9de9fdff386dfc
|
|
| MD5 |
cbd6525b0136f0e7b454d6480659e60b
|
|
| BLAKE2b-256 |
80db308c320002b1aa04bb502c03f1578f8f778ecb29c4605b7de50bd82b0687
|
File details
Details for the file django_app_auto_import-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_app_auto_import-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e3d0d8de577c6135652eff6e0501e87db81499d7a9c3b8c2a6c1d208480ff3
|
|
| MD5 |
0ec6e8b1abb8418f423efd67cddc4ddc
|
|
| BLAKE2b-256 |
28db8fcd919d670e240ec9fb2755ad6622faec4e0bc7b5d923aca1b853530999
|