# Model contains only one JSON field
class TestModel(models.Model):
field = JSONField(default=dict)
# Dictionary, assigned to model.field
field_json = {"test": 5}
model = TestModel(field = field_json)
model.save()
# Returns true. WHY???
print(id(model.field) == id(field_json))
保存模型后,模型不应该从数据库刷新吗?为什么模型字段保留对原始字典对象的可变引用?