From 2c5c41673bddce6bac8723e44a0dcae6b4eeebef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Mazza?= Date: Fri, 10 Apr 2026 08:00:17 -0300 Subject: [PATCH] Update supported Python/Django versions and fix badges --- README.md | 6 +++--- docs/index.md | 12 +++++------- setup.py | 3 +++ tox.ini | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 148f861..7baeb8d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Django Lifecycle Hooks -[![Package version](https://badge.fury.io/py/django-lifecycle.svg)](https://pypi.python.org/pypi/django-lifecycle) -[![Python versions](https://img.shields.io/pypi/status/django-lifecycle.svg)](https://img.shields.io/pypi/status/django-lifecycle.svg/) +[![Package version](https://badge.fury.io/py/django-lifecycle.svg)](https://pypi.org/project/django-lifecycle/) +[![PyPI status](https://img.shields.io/pypi/status/django-lifecycle.svg)](https://pypi.org/project/django-lifecycle/) [![Python versions](https://img.shields.io/pypi/pyversions/django-lifecycle.svg)](https://pypi.org/project/django-lifecycle/) -![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-lifecycle) +[![Django versions](https://img.shields.io/pypi/djversions/django-lifecycle)](https://pypi.org/project/django-lifecycle/) 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](https://docs.djangoproject.com/en/dev/topics/signals/). However, my team often finds that Signals introduce unnecessary indirection and are at odds with Django's "fat models" approach. diff --git a/docs/index.md b/docs/index.md index 6246313..6e1e86d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,8 @@ # Django Lifecycle Hooks - [![Package version](https://badge.fury.io/py/django-lifecycle.svg)](https://pypi.python.org/pypi/django-lifecycle) -[![Python versions](https://img.shields.io/pypi/status/django-lifecycle.svg)](https://img.shields.io/pypi/status/django-lifecycle.svg/) +[![PyPI status](https://img.shields.io/pypi/status/django-lifecycle.svg)](https://pypi.org/project/django-lifecycle/) [![Python versions](https://img.shields.io/pypi/pyversions/django-lifecycle.svg)](https://pypi.org/project/django-lifecycle/) -![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-lifecycle) - +[![Django versions](https://img.shields.io/pypi/djversions/django-lifecycle)](https://pypi.org/project/django-lifecycle/) 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](https://docs.djangoproject.com/en/dev/topics/signals/). However, my team often finds that Signals introduce unnecessary indirection and are at odds with Django's "fat models" approach. @@ -50,7 +48,7 @@ Instead of overriding `save` and `__init__` in a clunky way that hurts readabili def save(self, *args, **kwargs): - if self.pk is not None and self.contents != self._orig_contents): + if self.pk is not None and self.contents != self._orig_contents: self.updated_at = timezone.now() super().save(*args, **kwargs) @@ -61,8 +59,8 @@ Instead of overriding `save` and `__init__` in a clunky way that hurts readabili ## Requirements -* Python (3.7+) -* Django (2.2+) +* Python (3.8+) +* Django (4.2+) ## Installation diff --git a/setup.py b/setup.py index 0a5992d..245ec58 100644 --- a/setup.py +++ b/setup.py @@ -33,10 +33,13 @@ def readme(): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Framework :: Django", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", "Framework :: Django :: 5.2", + "Framework :: Django :: 6.0", ] setup( name="django-lifecycle", diff --git a/tox.ini b/tox.ini index f6d4283..2e6f31a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = {py38,py39,py310,py311,py312}-django42 {py310,py311,py312}-django50 {py310,py311,py312,py313,py314}-django52 - {py312,py314,py313,py314}-django60 + {py312,py313,py314}-django60 flake8 skip_missing_interpreters = False