Skip to content

Commit

Permalink
get_safe_settings' location has changed in Django 3.1 (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jan 31, 2020
1 parent fb4ffee commit a8ae50b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion debug_toolbar/panels/settings.py
@@ -1,11 +1,18 @@
from collections import OrderedDict

import django
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from django.views.debug import get_safe_settings

from debug_toolbar.panels import Panel

if django.VERSION >= (3, 1):
from django.views.debug import get_default_exception_reporter_filter

get_safe_settings = get_default_exception_reporter_filter().get_safe_settings
else:
from django.views.debug import get_safe_settings


class SettingsPanel(Panel):
"""
Expand Down

0 comments on commit a8ae50b

Please sign in to comment.