We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd47d87 commit 6febe5bCopy full SHA for 6febe5b
dbcleanup/__init__.py
@@ -1,3 +1,10 @@
1
__version__ = '0.1.1'
2
3
-default_app_config = 'dbcleanup.apps.DBCleanupConfig'
+# set default_app_config when using django earlier than 3.2
4
+try:
5
+ import django
6
+
7
+ if django.VERSION < (3, 2):
8
+ default_app_config = 'dbcleanup.apps.DBCleanupConfig'
9
+except ImportError:
10
+ pass
dbcleanup/apps.py
@@ -11,6 +11,7 @@
11
12
class DBCleanupConfig(AppConfig):
13
name = 'dbcleanup'
14
+ default_auto_field = 'django.db.models.AutoField'
15
16
def ready(self):
17
super().ready()
0 commit comments