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.
2 parents 482915d + 5f4e79f commit 46f6053Copy full SHA for 46f6053
django_prometheus/__init__.py
@@ -6,6 +6,7 @@
6
# Import all files that define metrics. This has the effect that
7
# `import django_prometheus` will always instantiate all metric
8
# objects right away.
9
+import django
10
from django_prometheus import middleware, models
11
12
__all__ = ["middleware", "models", "pip_prometheus"]
@@ -19,4 +20,5 @@
19
20
# If people don't have pip, don't export anything.
21
pass
22
-default_app_config = "django_prometheus.apps.DjangoPrometheusConfig"
23
+if django.VERSION < (3, 2):
24
+ default_app_config = "django_prometheus.apps.DjangoPrometheusConfig"
0 commit comments