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.
我有一个模型:
class Info(models.Model): m_id = models.IntegerField() message = models.CharField(max_length=500)
我希望能够将数据附加到消息字段。也就是说m_id = 1 message = 'Hello'存在。
m_id = 1
message = 'Hello'
我想做一个查询,将“世界”添加到message“Hello World”中
message
我怎样才能做到这一点?
修改,然后保存。
someinfo.message += ' World' someinfo.save()