【发布时间】:2015-12-17 12:18:06
【问题描述】:
目前我想做这样的事情:
entity_info = get_object_or_404(Entity, pk=entity_id)
entity_info.review = 5
我可以添加字段并传递给渲染,它工作正常。但是,现在我想一次添加很多字段,最好与字典合并。像这样的:
entity_info.update(new_dict)
我可以知道怎么做吗?谢谢
【问题讨论】:
标签: python django django-models django-orm