I know I can use constructor to mass assign when creating the class:
attributes = {'name':'John', 'surname':'Smith', ...}
record = Model(**attributes)
but how can I assign the attributes when I have existing record?
record = ....
record.???(**attributes)
Thanks!
You just assign to the attribute…
If you wanted to in effect do what the initialiser does, then you can use
setattrSee: https://developers.google.com/appengine/docs/python/datastore/modelclass#Model
and from there: