Dear all,
I’m stugging with a simple design decision and would appritiat if someone could push me into the right direction.
What I’m trying to achive:
A user should be able to upload data related to a project and parse it using a project specific parser.
The parser more or less reads ini files and returns json but I need different version of the parser for different versions of the data uploaded.
I’m not sure how to make the connection between the different implementations of the parsers and the entries in the Parser Model.
Hope my problem is understandable somehow.
class Parser(models.Model):
version = models.CharField(max_length=32, ...)
class Project(models.Model):
parser = models.ForeignKey(Parser, on_delete=CASCADE, default=None)
class ProjectData(models.Model):
project = models.ForeignKey(Project, on_delete=CASCADE, default=None)
data = models.TextField()
Does it make sense at all to have the table Parser in the DB and fixed implementations of the parser?
Thanks, Tomasz.