diff --git a/docs/docs.org b/docs/docs.org index 2072024..5bf7afc 100644 --- a/docs/docs.org +++ b/docs/docs.org @@ -252,6 +252,9 @@ class Computer(Device): def __str__(self): return str(self.name) + + class Meta: + ordering = ['ip'] #+END_SRC ** ComputerDiskRelation, ComputerRamRelation and ComputerCpuRelation diff --git a/network_inventory/inventory/models.py b/network_inventory/inventory/models.py index 88403ee..b2b9ef3 100644 --- a/network_inventory/inventory/models.py +++ b/network_inventory/inventory/models.py @@ -188,6 +188,9 @@ class Computer(Device): def __str__(self): return str(self.name) + class Meta: + ordering = ['ip'] + class ComputerDiskRelation(models.Model): disk = models.ForeignKey(Disk, on_delete=models.CASCADE)