Skip to content

Commit a8ae50b

Browse files
authored
get_safe_settings' location has changed in Django 3.1 (#1233)
1 parent fb4ffee commit a8ae50b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

debug_toolbar/panels/settings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
from collections import OrderedDict
22

3+
import django
34
from django.conf import settings
45
from django.utils.translation import gettext_lazy as _
5-
from django.views.debug import get_safe_settings
66

77
from debug_toolbar.panels import Panel
88

9+
if django.VERSION >= (3, 1):
10+
from django.views.debug import get_default_exception_reporter_filter
11+
12+
get_safe_settings = get_default_exception_reporter_filter().get_safe_settings
13+
else:
14+
from django.views.debug import get_safe_settings
15+
916

1017
class SettingsPanel(Panel):
1118
"""

0 commit comments

Comments
 (0)