1👍
You shouldn’t create class TableActivity. You can add field activtiy = models.ManyToManyField('Activity')
to table Table
or add field table = models.ManyToManyField('Table')
to table Activity
. And you should use model serializer for creating object in database
Source:stackexchange.com