From ba197a4b658f7e073cb8f6a3a27ffaf50a2469a5 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 24 Feb 2023 17:26:22 +0100 Subject: [PATCH] dj32: update use of default_app_config (#74843) Use a version condition as it's still necessary for Django 2.x. --- zoo/zoo_data/__init__.py | 5 ++++- zoo/zoo_meta/__init__.py | 5 ++++- zoo/zoo_nanterre/__init__.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/zoo/zoo_data/__init__.py b/zoo/zoo_data/__init__.py index a0ea79b..4db6c87 100644 --- a/zoo/zoo_data/__init__.py +++ b/zoo/zoo_data/__init__.py @@ -14,4 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -default_app_config = 'zoo.zoo_data.apps.ZooDataConfig' +import django + +if django.VERSION < (3, 2): + default_app_config = 'zoo.zoo_data.apps.ZooDataConfig' diff --git a/zoo/zoo_meta/__init__.py b/zoo/zoo_meta/__init__.py index 2177cd5..94ca905 100644 --- a/zoo/zoo_meta/__init__.py +++ b/zoo/zoo_meta/__init__.py @@ -14,4 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -default_app_config = 'zoo.zoo_meta.apps.ZooMetaAppConfig' +import django + +if django.VERSION < (3, 2): + default_app_config = 'zoo.zoo_meta.apps.ZooMetaAppConfig' diff --git a/zoo/zoo_nanterre/__init__.py b/zoo/zoo_nanterre/__init__.py index a870879..1ac4c1f 100644 --- a/zoo/zoo_nanterre/__init__.py +++ b/zoo/zoo_nanterre/__init__.py @@ -14,4 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -default_app_config = 'zoo.zoo_nanterre.apps.ZooNanterreConfig' +import django + +if django.VERSION < (3, 2): + default_app_config = 'zoo.zoo_nanterre.apps.ZooNanterreConfig'