Answers for "add to manytomany key django stackoverflow"

0

add to manytomany key django stackoverflow

my_obj.categories.add(fragmentCategory.objects.get(id=1))

# OR

my_obj.categories.create(name='val1')
Posted by: Guest on August-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language