tsg-humlab / shewrote

studying historical early women’s reception: oeuvres, texts, engagements / https://shewrote.rich.ru.nl/
0 stars 0 forks source link

Create explicit m2m linking table for persons related to field #18

Open dennis-bor opened 9 months ago

vanlummelhuizen commented 5 months ago

This Stackoverflow page may come in handy: https://stackoverflow.com/questions/33257530/how-to-add-through-option-to-existing-manytomanyfield-with-migrations-and-data-i

vanlummelhuizen commented 5 months ago

May be this one is even better: https://docs.djangoproject.com/en/4.2/howto/writing-migrations/#changing-a-manytomanyfield-to-use-a-through-model

vanlummelhuizen commented 5 months ago

The code in https://github.com/tsg-humlab/shewrote/commit/403e2de459aa56658355c4291c33cc7e5ee9b247 seems to do the trick. I am only in doubt about the related_name arguments in the from_person and to_person fields of PersonPersonRelation. @dennis-bor could you shine your light on this?

vanlummelhuizen commented 20 hours ago

See #29