Skip to main content
Project generated with PyScaffold PyPI-Server GitHub Test CI Monthly Downloads

django-app-auto-import

Auto import a module from all yours apps!

Quick Start

# my.project.settings.py
INSTALLED_APPS = [
    ...,
    'cocodev.django.auto_import',
    ...,
]
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/.

Release files for django-app-auto-import 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-app-auto-import 1.0.2
File Size Uploaded
django_app_auto_import-1.0.2.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-app-auto-import 1.0.2
File Interpreter ABI Platform
django_app_auto_import-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / django_app_auto_import-1.0.2.tar.gz

Download URL django_app_auto_import-1.0.2.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2fafebf9334e41ccfbff6c56c7055882cef7018158c1465cbea31b0b6a79e873
BLAKE2b-256 checksum
How to use checksums
87cf40981a9a91b909c8491c0c4d5a29c39dabeccba0ff7ccfd2d9d1dca8e87d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / django_app_auto_import-1.0.2-py3-none-any.whl

Download URL django_app_auto_import-1.0.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
529535e427fae11cbf4afe59db5aaaf4ba92e66afc1570a9e79fb8612d646c84
BLAKE2b-256 checksum
How to use checksums
19aa432a8ee5a3df3a41ee68d5b5504d6031e5b1ac222cd317461aba325644ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page