when retrieving the bindserver object, return the hostname as a string for the object itself
This commit is contained in:
parent
3908e12ca4
commit
01a2d2382c
|
@ -45,7 +45,6 @@ class Key(models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["name"]
|
ordering = ["name"]
|
||||||
|
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
f = Fernet(settings.FERNET_KEY)
|
f = Fernet(settings.FERNET_KEY)
|
||||||
crypted_key = f.encrypt(bytes(self.data, encoding="utf8"))
|
crypted_key = f.encrypt(bytes(self.data, encoding="utf8"))
|
||||||
|
@ -107,6 +106,9 @@ class BindServer(models.Model):
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.hostname
|
return self.hostname
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.hostname
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["hostname"]
|
ordering = ["hostname"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue