Skip to main content

Auto import a module from all yours apps!

Project description

Project generated with PyScaffold

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_app_auto_import-1.0.1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_app_auto_import-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for django_app_auto_import-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e2bde16aae1753bb3b60779ffa112e2899bcb0ebec89273c1e9de9fdff386dfc
MD5 cbd6525b0136f0e7b454d6480659e60b
BLAKE2b-256 80db308c320002b1aa04bb502c03f1578f8f778ecb29c4605b7de50bd82b0687

See more details on using hashes here.

File details

Details for the file django_app_auto_import-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_app_auto_import-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79e3d0d8de577c6135652eff6e0501e87db81499d7a9c3b8c2a6c1d208480ff3
MD5 0ec6e8b1abb8418f423efd67cddc4ddc
BLAKE2b-256 28db8fcd919d670e240ec9fb2755ad6622faec4e0bc7b5d923aca1b853530999

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page