add a boolean to check for type ecc to the RAM class

This commit is contained in:
Andreas Zweili 2017-12-22 23:42:06 +01:00
parent a74740228e
commit d43215b535
2 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class RamType(models.Model):
class Ram(models.Model):
type = models.ForeignKey(RamType, on_delete=models.CASCADE)
size_in_gb = models.FloatField()
ecc = models.BooleanField(default=False)
def __str__(self):
return '{} {} GB'.format(self.type, self.size)

View File

@ -33,6 +33,7 @@ class RamType(models.Model):
class Ram(models.Model):
type = models.ForeignKey(RamType, on_delete=models.CASCADE)
size_in_gb = models.FloatField()
ecc = models.BooleanField(default=False)
def __str__(self):
return '{} {} GB'.format(self.type, self.size)