Skip to content

Commit

Permalink
Fix Django 3.2 default_app_config deprecation (#198)
Browse files Browse the repository at this point in the history
* Fix ImportError from setup.py
  • Loading branch information
Andrew-Chen-Wang committed Aug 22, 2021
1 parent 76d4ab4 commit 53c99af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cachalot/__init__.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 53c99af

Please sign in to comment.