RSE-Sheffield / RSEAdmin

A Resource Allocation and Finance tool for RSE Groups
https://rseadmin.readthedocs.io/en/latest/
MIT License
24 stars 6 forks source link

Separate models into different files #223

Open yld-weng opened 11 months ago

yld-weng commented 11 months ago

Would it be better to separate models by categories:

yld-weng commented 11 months ago

To avoid circular import, use string rather than the model class when creating ForeignKey:

year = models.ForeignKey(FinancialYear, on_delete=models.PROTECT)  

to

year = models.ForeignKey('rse.FinancialYear', on_delete=models.PROTECT)