order computers by their IP address
This commit is contained in:
parent
11b5d3c3f2
commit
01631f0ca9
|
@ -252,6 +252,9 @@ class Computer(Device):
|
|||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
class Meta:
|
||||
ordering = ['ip']
|
||||
#+END_SRC
|
||||
|
||||
** ComputerDiskRelation, ComputerRamRelation and ComputerCpuRelation
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue