File tree Expand file tree Collapse file tree
sentry_sdk/integrations/django Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,16 +56,16 @@ def _got_request_exception(request=None, **kwargs):
5656_installed = False
5757
5858
59- def initialize ():
59+ def _install ():
6060 global _installed
6161 with _installer_lock :
6262 if _installed :
6363 return
64- _initialize_impl ()
64+ _install_impl ()
6565 _installed = True
6666
6767
68- def _initialize_impl ():
68+ def _install_impl ():
6969 # default settings.MIDDLEWARE is None
7070 if getattr (settings , 'MIDDLEWARE' , None ):
7171 middleware_attr = 'MIDDLEWARE'
@@ -87,20 +87,18 @@ def _initialize_impl():
8787 signals .got_request_exception .connect (_got_request_exception )
8888
8989
90-
91-
9290try :
9391 # Django >= 1.7
9492 from django .apps import AppConfig
9593except ImportError :
96- initialize ()
94+ _install ()
9795else :
9896 class SentryConfig (AppConfig ):
9997 name = 'sentry_sdk.integrations.django'
10098 label = 'sentry_sdk_integrations_django'
10199 verbose_name = 'Sentry'
102100
103101 def ready (self ):
104- initialize ()
102+ _install ()
105103
106104 default_app_config = 'sentry_sdk.integrations.django.SentryConfig'
You can’t perform that action at this time.
0 commit comments