{"repo":"rsinger86/django-lifecycle","free":true,"listed":false,"github":"https://github.com/rsinger86/django-lifecycle","clone":"git clone https://github.com/rsinger86/django-lifecycle.git","description":"Declarative model lifecycle hooks, an alternative to Signals.","language":"Python","stars":1405,"topics":["django-models","lifecycle-hooks","django","transition-conditions"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Django Lifecycle Hooks This project provides a @hook decorator as well as a base model and mixin to add lifecycle hooks to your Django models. Django's built-in approach to offering lifecycle hooks is Signals. However, my team often finds that Signals introduce unnecessary indirection and are at odds with Django's \"fat models\" approach. Django Lifecycle Hooks supports: Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 Django 4.2, 5.0, 5.2 and 6.0 In short, you can write model code like this: Instead of overriding save and init in a clunky way that hurts readability: --- Documentation : https://rsinger86.github.io/django-lifecycle Source Code : https://github.com/rsinger86/django-lifecycle --- Changelog See Changelog Testing Tests are found in a simplified Django project in the /tests folder. Install the project requirements and do ./manage.py test to run them. License See License.","default_branch":null,"files":null,"tree":[],"storefront":"/r/rsinger86","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rsinger86/django-lifecycle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}