MCPcopy
hub / github.com/jumpserver/jumpserver / get

Method get

apps/settings/api/settings.py:202–218  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

200 permission_classes = (AllowAny,)
201
202 def get(self, request, *args, **kwargs):
203 size = request.GET.get('size', 'small')
204 interface_data = get_interface_setting_or_default()
205 if size == 'small':
206 logo_path = interface_data['logo_logout']
207 else:
208 logo_path = interface_data['logo_index']
209
210 if logo_path.startswith('/media/'):
211 logo_path = logo_path.replace('/media/', '')
212 document_root = settings.MEDIA_ROOT
213 elif logo_path.startswith('/static/'):
214 logo_path = logo_path.replace('/static/', '/')
215 document_root = settings.STATIC_ROOT
216 else:
217 return HttpResponse(status=status.HTTP_404_NOT_FOUND)
218 return serve(request, logo_path, document_root=document_root)
219
220
221class ClientVersionView(APIView):

Callers 15

leFunction · 0.45
veFunction · 0.45
SeFunction · 0.45
LeFunction · 0.45
aFunction · 0.45
jquery.form.min.jsFile · 0.45
setFunction · 0.45
bootstrap.min.jsFile · 0.45
removeFunction · 0.45
getInstanceMethod · 0.45
PFunction · 0.45

Calls 1

Tested by

no test coverage detected