(self, request, *args, **kwargs)
| 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 | |
| 221 | class ClientVersionView(APIView): |
no test coverage detected