Order OperatingSystem and HostType as displayed

This commit is contained in:
Paal Braathen committed 2014-09-11 18:40:38 +02:00
1 parent 8e05c2e4d4
commit 93209b2e10
1 file changed
+6
+6
View File
@@ -412,6 +412,9 @@ class HostType(models.Model):
def num_members(self):
return self.host_set.count()
class Meta:
ordering = ("host_type")
class OsArchitecture(models.Model):
architecture = models.CharField(max_length=64)
@@ -426,6 +429,9 @@ class OperatingSystem(models.Model):
def __unicode__(self):
return self.name + " " + self.version + " (" + unicode(self.architecture) + ")"
class Meta:
ordering = ("name","version")
class Host(models.Model):
location = models.CharField(max_length=1024)
brand = models.CharField(max_length=1024)