File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11import io
2+ import logging
23import os
34import urllib .parse
45import urllib .request
@@ -108,11 +109,10 @@ def setup_spotlight(options):
108109
109110 url = options .get ("spotlight" )
110111
111- if isinstance (url , str ):
112- pass
113- elif url is True :
112+ if url is True :
114113 url = DEFAULT_SPOTLIGHT_URL
115- else :
114+
115+ if not isinstance (url , str ):
116116 return None
117117
118118 if (
@@ -126,5 +126,9 @@ def setup_spotlight(options):
126126 settings .MIDDLEWARE = type (middleware )(
127127 chain (middleware , (DJANGO_SPOTLIGHT_MIDDLEWARE_PATH ,))
128128 )
129+ logging .info ("Enabled Spotlight integration for Django" )
130+
131+ client = SpotlightClient (url )
132+ logging .info ("Enabled Spotlight at %s" , url )
129133
130- return SpotlightClient ( url )
134+ return client
You can’t perform that action at this time.
0 commit comments