Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以用户Model.update(...)在 peewee 中将新元素插入到 ArrayField 中吗?
Model.update(...)
更何况,JSONField 呢?
未经测试,但您可以尝试:
MyModel.update( arr_field=fn.array_append( MyModel.arr_field, 'new value') ).where(MyModel.id == 1)