Not define default_app_config for Django 3.2+

This commit is contained in:
Alieh Rymašeŭski 2021-06-30 11:33:09 +03:00
parent 48adbc5a1e
commit cc90f32ada
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,4 @@
import django
from pkg_resources import DistributionNotFound, get_distribution
try:
@ -6,4 +7,5 @@ except DistributionNotFound:
# package is not installed
pass
default_app_config = "auditlog.apps.AuditlogConfig"
if django.VERSION < (3, 2):
default_app_config = "auditlog.apps.AuditlogConfig"

View file

@ -1 +1,4 @@
default_app_config = "auditlog_tests.apps.AuditlogTestConfig"
import django
if django.VERSION < (3, 2):
default_app_config = "auditlog_tests.apps.AuditlogTestConfig"