{"id":16418496,"url":"https://github.com/nitely/django-hooks","last_synced_at":"2025-06-20T15:34:51.097Z","repository":{"id":18853176,"uuid":"22069561","full_name":"nitely/django-hooks","owner":"nitely","description":":anchor: A modular plugin system for Django","archived":false,"fork":false,"pushed_at":"2016-06-22T03:24:19.000Z","size":79,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T13:39:16.819Z","etag":null,"topics":["django","hooks","party-apps","plugins","python"],"latest_commit_sha":null,"homepage":"http://django-hooks.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitely.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-21T15:27:37.000Z","updated_at":"2025-02-24T08:13:13.000Z","dependencies_parsed_at":"2022-09-09T10:01:29.854Z","dependency_job_id":null,"html_url":"https://github.com/nitely/django-hooks","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nitely/django-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitely%2Fdjango-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitely%2Fdjango-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitely%2Fdjango-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitely%2Fdjango-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitely","download_url":"https://codeload.github.com/nitely/django-hooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitely%2Fdjango-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260971136,"owners_count":23090679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","hooks","party-apps","plugins","python"],"created_at":"2024-10-11T07:14:17.593Z","updated_at":"2025-06-20T15:34:46.077Z","avatar_url":"https://github.com/nitely.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-hooks\n\n[![Build Status](https://img.shields.io/travis/nitely/django-hooks.svg?style=flat-square)](https://travis-ci.org/nitely/django-hooks)\n[![Coverage Status](https://img.shields.io/coveralls/nitely/django-hooks.svg?style=flat-square)](https://coveralls.io/r/nitely/django-hooks)\n[![pypi](https://img.shields.io/pypi/v/django-hooks.svg?style=flat-square)](https://pypi.python.org/pypi/django-hooks)\n[![licence](https://img.shields.io/pypi/l/django-hooks.svg?style=flat-square)](https://raw.githubusercontent.com/nitely/django-hooks/master/LICENSE)\n\nA modular plugin system for django apps.\n\nThere are 3 kinds of hooks:\n\n* TemplateHook: Third-party apps will be able to insert their own code (text/html) into an app template.\n* FormHook: Third-party apps will be able to insert Forms in an app view.\n* ~~ViewHook~~: This is deprecated in favor of `FormHook`\n* SignalHook: Connect or emit a signal by its name/id. This is the same as Django signals\nexcept that they don't need to be pre-defined.\n\n## Why?\n\nLet's say we want to render contextual information beside a record allocated in `my_main_app`.\nThis extra information can be provided by some third-party application: Notes, Attachments,\nComments, Followers, etc.\n\nAdding an `{% include %}` tag to our `my_record.html` is not possible because we don't know what\nto render beforehand (a note? a list of comments?) or even if any of those applications are\ninstalled for our case/customer/project.\n\nWe can create a *TemplateHook* `{% hook 'my_contextual_info' %}` where we delegate the rendering and\ncontent retrieval to the hooked app(s). By doing so, `my_record.html` doesn't need to be touched anymore,\nno need to add more templatetags to `{% load %}` and we also make it easily reusable.\n\n## Compatibility\n\n* Django 1.8 LTS; Python 2.7, 3.4 or 3.5\n\n## Documentation\n\n[Read The Docs](http://django-hooks.readthedocs.org/en/latest/)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitely%2Fdjango-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitely%2Fdjango-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitely%2Fdjango-hooks/lists"}