Django Lifecycle

screenshot of Django Lifecycle
django

Declarative model lifecycle hooks, an alternative to Signals.

Overview

The Django Lifecycle Hooks package offers a convenient solution for adding lifecycle hooks to Django models without the complexity of Django's Signals. By providing a @hook decorator, base model, and mixin, this package allows developers to enhance their Django models with ease. It supports various Python and Django versions, making it versatile for different projects.

Features

  • @hook decorator: Easily add lifecycle hooks to Django models.
  • Base model and mixin: Provides a foundation for integrating lifecycle hooks into models.
  • Support for multiple Python versions: Python 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12.
  • Compatibility with various Django versions: Django 2.2, 3.2, 4.0, 4.1, 4.2, and 5.0.
  • Improved model code readability: Enhances readability by avoiding clunky overrides of save and __init__ methods.
django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.