Fix Django 3.2 default_app_config deprecation (#198)

* Fix ImportError from setup.py
This commit is contained in:
Andrew Chen Wang 2021-08-21 20:55:33 -04:00 committed by GitHub
parent 76d4ab4c8d
commit 53c99af2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,10 @@
VERSION = (2, 4, 2)
__version__ = ".".join(map(str, VERSION))
default_app_config = "cachalot.apps.CachalotConfig"
try:
from django import VERSION as DJANGO_VERSION
if DJANGO_VERSION < (3, 2):
default_app_config = "cachalot.apps.CachalotConfig"
except ImportError:
default_app_config = "cachalot.apps.CachalotConfig"