def get(self, request, *args, **kwargs): try: content = request.GET.get('content', "") code_image = QRCodeHelper.save_qr_code_stream(content) response = HttpResponse(code_image, content_type="image/png") except Exception as ex: SimpleLogger.exception(ex) return response return qs
def qr_code(request): try: content=request.GET.get('content',"") file_id=request.GET.get('file_id',"") history_id=request.GET.get('history_id',"") code_image=QRCodeHelper.save_qr_code_stream(content+"&file_id="+str(file_id)+"&history_id="+str(history_id)) response = HttpResponse(code_image, content_type="image/png") except Exception as ex: SimpleLogger.exception(ex) return response
def get(self, request, *args, **kwargs): try: output_id = self.kwargs.get('output_id', 0) code_image = QRCodeHelper.save_qr_code_stream(WEB_HOST + "/ci/task/output/" + str(output_id) + "/download") response = HttpResponse(code_image, content_type="image/png") except Exception as ex: SimpleLogger.exception(ex) return response