Skip to main content

Simple Django Hooks

Project description

Django Hookup

Simple Django Hooks.


pip install django_hookup

Register function:

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

import django_hookup

hooks = django_hookup.get_hooks("register_foobar")

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

Hooks Admin (Optional)

Add django_hookup in



Add django_hookup.url


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

Download files

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

Source Distribution

django_hookup-0.0.2.tar.gz (4.6 kB view hashes)

Uploaded source

Built Distribution

django_hookup-0.0.2-py3-none-any.whl (5.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page