[Python] How to do an append to an existing field in a Django Model?

Discussão em 'Python' iniciado por Stack, Abril 6, 2025.

  1. Stack

    Stack Membro Participativo

    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?

    Continue reading...

Compartilhe esta Página