The matrix and model design in Django

I have a matrix like this:

                0                 1                 2

    AX <= 1     standard          Bronze            Gold
    AX <= 2     Gold              Standard          Bronze

I want to write a model for this matix. Is there any specific way for such data?

Is the model below the correct model for the above matrix?

class Matrix(models.Model):
      ax = models.IntegerField(verbose_name=u"ax", default=None, null=True, blank=True)
      index = models.IntegerField(verbose_name=u"index", default=None, null=True, blank=True)
      metal = models.CharField(max_length=255, verbose_name=u"Metal", default=None, null=True, blank=True)

Thanks in advance

+3
source share

All Articles