2👍
✅
add() accepts an arbitrary number of arguments, not a list of them.
add(obj1, obj2, obj3, ...)
To expand that list into arguments, use *
add(*[obj1, obj2, obj3])
use this as (@EchoUA Team) mentioned in comments
items = list(item)
q.item.add(*items)
0👍
You are missing the second “save()” call.
q = Catalog(title=title, pub_date=timezone.now(),user=user)
q.save()
q.item = item.values()
q.save() # you need this save as well
- [Answered ]-Make All hashtags clickable in Template with Templatetags
- [Answered ]-In Django, how do I order_by() when reaching across tables?
Source:stackexchange.com