sort disks by their type

This commit is contained in:
Andreas Zweili 2017-12-27 17:12:47 +01:00
parent 6ab4959d2d
commit f554bd5142
2 changed files with 6 additions and 0 deletions

View File

@ -160,6 +160,9 @@ class Disk(models.Model):
def __str__(self):
return '{} {}'.format(self.type, self.size_in_gb)
class Meta:
ordering = ['type']
#+END_SRC
** Architecture, CpuManufacturer and Cpu

View File

@ -119,6 +119,9 @@ class Disk(models.Model):
def __str__(self):
return '{} {}'.format(self.type, self.size_in_gb)
class Meta:
ordering = ['type']
class Architecture(models.Model):
name = models.CharField(max_length=50)