mcallaghan / nacsos

topic model visualization
GNU General Public License v3.0
15 stars 10 forks source link

Rationalise model bloat - making things polymorphic #77

Open mcallaghan opened 5 years ago

mcallaghan commented 5 years ago

We have a few cases where models have several null fields for a generic relationship to one of several possible specific relations.

E.g. the DocTopic object has a generic "document" that can be either a scoping Doc or a Parliament Paragraph or in future a Twitter Status.

Perhaps it's better to have an abstract base Doc with some generic features that is then linked to specific doc types

https://django-polymorphic.readthedocs.io/en/stable/