So let's assume that I have a model with a jsonfield while using Postgres as a database
class Baum(models.Model):
myjson = models.JSONField(...)
Now I'd like to know what would be the best way to edit the model fields saving behaviour/interaction with the database
You can do:
myBaum = Baum.objects.get()
myBaum.myjson |= newdata # dictionary update, Python 3.9+
myBaum.save()