我想使用django视图在字典中保存多个字段。
我的代码:
promotions = Promotions.objects.filter(member = request.user)
list11 = []
dictt = {}
d = []
i = 0
for q in promotions:
c = customer_request.objects.filter(promotion = q)
e = c.count()
d.append(e)
dictt[e] = e
list11.append(c)
print("counttttttttttttttt", dictt)
答案 0 :(得分:0)
代码: img_name = {} img_name = {'名称':' xyz','键入':' jpg','路径':&# 39 /温度/' }