Skip to main content

Django Hookup

Simple Django Hooks.

Install:

pip install django_hookup

Register function:

# myapp.hooks.py
import django_hookup

@django_hookup.register("register_foobar", order=1)
def say_foo(text):
    """Concat foo and given text"""
    return "foo:%s " % text

@django_hookup.register("register_foobar", order=0)
def say_bar(text):
    """Concat bar and given text"""
    return "bar:%s " % text

Calling hooks

# myapp.somewhere.py
import django_hookup

hooks = django_hookup.get_hooks("register_foobar")

text = ""
for func in hooks:
    text += func(func.__name__)
print(text)

Hooks Admin (Optional)

Add django_hookup in settings.py

# settings.py

INSTALLED_APPS = [
    "example.app",
    "django_hookup",
    # 
    'django.contrib.admin',
    ...
]

Add django_hookup.url

# settings.py

urlpatterns = [
    path("admin/hooks/", include("django_hookup.urls")),
    path("admin/", admin.site.urls),
]

Metadata

Release files for django-hookup 0.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-hookup 0.0.2
File Size Uploaded Provenance Actions
django_hookup-0.0.2.tar.gz 4.6 kB Without provenance Details for django_hookup-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-hookup 0.0.2
File Interpreter ABI Platform Actions
django_hookup-0.0.2-py3-none-any.whl Python 3 none any Details for django_hookup-0.0.2-py3-none-any.whl

Total release size: 10.1 kB

Release files / django_hookup-0.0.2.tar.gz

Download URL django_hookup-0.0.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3b43473ebda61c5ce76f11ce9538c25ea7337a3f41e67f5c857ecf11ac7ab82b
BLAKE2b-256 checksum
How to use checksums
361d4f2380c8b26dcbd667a50bf9ff8485905324eb2cd3e6ddb78646f4772d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / django_hookup-0.0.2-py3-none-any.whl

Download URL django_hookup-0.0.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00cf86bc414db9108e321ab7d783b2f4706544f9a940535d590e71f41d8e6658
BLAKE2b-256 checksum
How to use checksums
61ad2211e77a8577d02c210da4d84b0f271572d06c2edb59226020f1725d1ea5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for django-hookup 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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