Reputation: 4237
I have a model :
class Info(models.Model):
m_id = models.IntegerField()
message = models.CharField(max_length=500)
I want to be able to append data to message field. That is say for m_id = 1
message = 'Hello'
exists.
I want do a query that will add 'World' to message
thus making it 'Hello World'
How can I do this?
Upvotes: 2
Views: 2592
Reputation: 798536
Modify, then save.
someinfo.message += ' World'
someinfo.save()
Upvotes: 7