mysql db table XXX
id | a |
---------
1 | 111|
2 | 222|
3 | 333|
I got query result from mysql database.
info = XXX.objects.filter(a = 111)
for item in info:
item.update({b:111})
It makes error “XXX has no attribute ‘update’
I want to append more key:value set into item.
How can I go it?
In Django filter return the list of QuerySet not dictionary so @Danfi’s approach is right