From 78149ff2f2f7ea90f3d32c49d937e53c989261d7 Mon Sep 17 00:00:00 2001 From: Marcus Aram Date: Tue, 16 Aug 2022 14:36:45 +0200 Subject: [PATCH 1/3] Fixes #515 - Make it work with Django 4.1 --- actstream/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actstream/registry.py b/actstream/registry.py index 3b145ca5..e69f0d79 100644 --- a/actstream/registry.py +++ b/actstream/registry.py @@ -57,7 +57,7 @@ def is_installed(model_class): Returns True if a model_class is installed. model_class._meta.installed is only reliable in Django 1.7+ """ - return model_class._meta.installed + return model_class._meta.app_config is not None def validate(model_class, exception_class=ImproperlyConfigured): From 550348391791728f0da2f853009ca073d79526ae Mon Sep 17 00:00:00 2001 From: Marcus Aram Date: Tue, 16 Aug 2022 15:26:02 +0200 Subject: [PATCH 2/3] Fixes #515 - Change comment to the change --- actstream/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actstream/registry.py b/actstream/registry.py index e69f0d79..73dec9d7 100644 --- a/actstream/registry.py +++ b/actstream/registry.py @@ -55,7 +55,7 @@ def label(model_class): def is_installed(model_class): """ Returns True if a model_class is installed. - model_class._meta.installed is only reliable in Django 1.7+ + model_class._meta.app_config is only reliable in Django 1.7+ """ return model_class._meta.app_config is not None From 7a5f3e82264dcde82aa0d8c3a16f1446f8634051 Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Wed, 17 Aug 2022 20:55:09 -0400 Subject: [PATCH 3/3] django 4.1 in tox --- actstream/registry.py | 4 ++-- tox.ini | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actstream/registry.py b/actstream/registry.py index 3b145ca5..73dec9d7 100644 --- a/actstream/registry.py +++ b/actstream/registry.py @@ -55,9 +55,9 @@ def label(model_class): def is_installed(model_class): """ Returns True if a model_class is installed. - model_class._meta.installed is only reliable in Django 1.7+ + model_class._meta.app_config is only reliable in Django 1.7+ """ - return model_class._meta.installed + return model_class._meta.app_config is not None def validate(model_class, exception_class=ImproperlyConfigured): diff --git a/tox.ini b/tox.ini index 70485b48..d8fade11 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = py{37,38,39}-django32-{mysql,postgres,sqlite} py{38,39}-django40-{mysql,postgres,sqlite} + py{38,39}-django41-{mysql,postgres,sqlite} toxworkdir=/tmp/.tox [testenv] @@ -11,6 +12,7 @@ deps = coverage>=4.5.1 django32: Django>=3.2,<4.0 django40: Django>=4.0,<4.1 + django41: Django>=4.1,<4.2 mysql: mysqlclient>=2.0.0 mysql: django-mysql>=2.4.1 postgres: psycopg2-binary>=2.8