tools
This commit is contained in:
+5
-6
@@ -117,9 +117,8 @@ def chart_run(request, get_chart_sort):
|
||||
# chart 展示图片的路径
|
||||
# out_path 输出文件的路径
|
||||
print(data)
|
||||
|
||||
eval(f'charts.{chart_name}')(file_path[0], f"{chart_out_path}_{k}.png", out_path, **data)
|
||||
|
||||
return JsonResponse({"img": f"/static/img_eg/show_chart/{file_id}_{k}.png"})
|
||||
|
||||
|
||||
try:
|
||||
eval(f'charts.{chart_name}')(file_path[0], f"{chart_out_path}_{k}.png", out_path, **data)
|
||||
except:
|
||||
return JsonResponse({"ba": "File format error or parameter error"})
|
||||
return JsonResponse({"img": f"/static/img_eg/show_chart/{file_id}_{k}.png", "ba": "0"})
|
||||
|
||||
Reference in New Issue
Block a user