How do I add fixtures to many-to-many tables?

In my user model, I have five variables with many-to-many fields. I want to load fixtures for each of them. I can’t do it since I have never defined serializers for them since Django handles the table creation for me and as an FYI I’m getting Problem installing fixture. So how would I go about adding fixtures (mock data) to my many-to-many relationship tables?

Thanks in advance!

You can specify a list of related objects by pk in your fixture for the object containing the ManyToManyField. (The precise syntax varies based upon which format you’re using for your fixture and the definitions of the models involved.)

1 Like

Ahh, I see. Thank you Ken!