diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index c9e018b4..eabaa693 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -25,7 +25,7 @@ jobs: - django_version: '3.1' python_version: '3.5' - - django_version: '3.1' + - django_version: '3.2' python_version: '3.5' include: - django_version: '2.2' @@ -66,7 +66,7 @@ jobs: sudo apt-get install -y libproj-dev libgeos-dev gdal-bin libgdal-dev python -m pip install --upgrade pip pip install -U flake8 coveralls psycopg2-binary argparse - pip install -U Django~=${{ matrix.django_version }} + pip install -U Django~=${{ matrix.django_version }}.0 - name: Lint with flake8 run: | flake8 --ignore=E501,W504 leaflet diff --git a/leaflet/__init__.py b/leaflet/__init__.py index 9178fcd4..720afa24 100644 --- a/leaflet/__init__.py +++ b/leaflet/__init__.py @@ -1,6 +1,7 @@ from collections import OrderedDict from urllib.parse import urlparse +import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.templatetags.static import static @@ -182,4 +183,5 @@ def _normalize_plugins_config(): PLUGINS['__is_normalized__'] = True -default_app_config = 'leaflet.apps.LeafletConfig' +if django.VERSION <= (3, 1): + default_app_config = 'leaflet.apps.LeafletConfig'