【发布时间】:2016-12-09 06:00:15
【问题描述】:
我想使用 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)
【问题讨论】:
-
你想在这里达到什么目的?
标签: python django dictionary