添加颜色信息 修改属性
This commit is contained in:
+1
-10
@@ -46,21 +46,12 @@ def out_page(request, page):
|
||||
# 处理上传文件 返回颜色列表
|
||||
def up_file(request):
|
||||
file = request.FILES.get("file")
|
||||
col_name = request.POST.get("col_name", "color")
|
||||
if col_name == "NO":
|
||||
file_path, file_id = path_out("chart")
|
||||
keep_file(file, file_path)
|
||||
|
||||
data = {"flag": file_id}
|
||||
return JsonResponse(data)
|
||||
|
||||
file_path, file_id = path_out("chart")
|
||||
|
||||
keep_file(file, file_path)
|
||||
|
||||
col_list = pick_col(file_path, col_name)
|
||||
data = {"flag": file_id}
|
||||
|
||||
data = {"flag": file_id, 'data': [{"title": f"color_{i}", 'name': i, } for i in col_list][:8]}
|
||||
return JsonResponse(data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user