0
My question is the following, in my application I have a profile template that has the following fields:
Models py.:
class Perfil(models.Model):
nome = models.CharField(max_length=255, null=False)
pontuacao_total = models.FloatField(max_length=4, default=0)
pontuacao_ultima = models.FloatField(max_length=4, default=0)
In this application, there will be several rounds of plays, in this modeling, each round will have its score associated with the field pontuacao_ultima
, and the pontuacao_total
shall be the sum of those scores.
For example:
1st Round: 10 points
2nd Round: 15 points
In this case, pontuacao_ultima
will be equal to 15 and pontuacao_total
equal to 25.
However in this way of addressing the situation there is a big problem that is the loss of the data, I will only have stored the total scores and the last of each player.
So I wanted to ask a suggestion for any solution in this case, what can I do to not lose this data? Why I searched there is no possibility of a field of the model being a list that would store the value of each round...
Someone can give me a light?
Great solution by the way.
– Marlysson