This evening I learned how to set up a ManyToMany value in a fixture. I ended up using the “dumpdata” feature of manage.py to figure out the syntax.
I’ve got a ManyToMany field for one of my models called “district”. I wanted to link the model instance to one district object (district ID #1):
"district": [1]
If I wanted add them to more than one district it would look like this:
"district": [1, 2, 5]