Skip to content

Commit 7a278e6

Browse files
Conditionally use deprecated default_app_config (#12)
Conditionally use deprecated default_app_config `default_app_config` is being removed in Django 4.1 and a new warning has shown up since 3.2 https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-4-1
1 parent bb3dd18 commit 7a278e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

django_pgviews/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
default_app_config = "django_pgviews.apps.ViewConfig"
1+
import django
2+
3+
if django.VERSION < (3, 2):
4+
default_app_config = "django_pgviews.apps.ViewConfig"

0 commit comments

Comments
 (0)