Merge pull request #4 from paalbra/master

Order OperatingSystem and HostType as displayed
This commit is contained in:
nikolark committed 2014-09-11 19:41:21 +02:00
commit 0b1d6de47c
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)