From ec4ce811fad9b35f0d24c61a64a1c4678b1efd74 Mon Sep 17 00:00:00 2001 From: Kigathi-Chege <30687709+kigathi-chege@users.noreply.github.com> Date: Mon, 3 Feb 2025 17:47:11 +0300 Subject: [PATCH 1/2] Update models.py Retrieve app_label from model meta if no app is specified --- simple_history/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simple_history/models.py b/simple_history/models.py index b007efbf..888e013e 100644 --- a/simple_history/models.py +++ b/simple_history/models.py @@ -644,8 +644,7 @@ def get_meta_options(self, model): ) meta_fields["verbose_name"] = name meta_fields["verbose_name_plural"] = plural_name - if self.app: - meta_fields["app_label"] = self.app + meta_fields["app_label"] = self.app if self.app else model._meta.app_label if self._date_indexing == "composite": meta_fields["indexes"] = ( models.Index(fields=("history_date", model._meta.pk.attname)), From 40db128e87e2fdb91e57c546cd25b27b35358036 Mon Sep 17 00:00:00 2001 From: Kigathi-Chege <30687709+kigathi-chege@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:56:41 +0000 Subject: [PATCH 2/2] Add name to authors --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 16602a25..bf4279f3 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -147,6 +147,7 @@ Authors - `Sridhar Marella `_ - `Mattia Fantoni `_ - `Trent Holliday `_ +- `Kigathi Chege `_ Background ==========