tsg-humlab / shewrote

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

Remove quotes around model name in ForeignKey field #5

Closed vanlummelhuizen closed 10 months ago

vanlummelhuizen commented 11 months ago

See for instance 'Place' in https://github.com/tsg-humlab/shewrote/blob/dde56bccbf2b4c8dc9ddc2c69b9281a521c36130/shewrote/models.py#L34

If there are no quotes it is easier to navigate in your IDE.

vanlummelhuizen commented 11 months ago

.. and ManyToMany fields

dennis-bor commented 11 months ago

Removing the quotes makes it that django cannot resolve the reference to Place, because Place is defined later. We might be able to resolve this after we straighten out the FK and M2M relationships.

vanlummelhuizen commented 11 months ago

I think you can solve this by changing the order of the models in the file. Things higher up are defined before things lower in the file.