mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Updating page title to include asdot notation
This commit is contained in:
@ -125,6 +125,9 @@ class ASN(PrimaryModel):
|
|||||||
verbose_name_plural = 'ASNs'
|
verbose_name_plural = 'ASNs'
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
if self.asn > 65535:
|
||||||
|
return 'AS{} ({}.{})'.format(self.asn, self.asn // 65536, self.asn % 65536)
|
||||||
|
else:
|
||||||
return f'AS{self.asn}'
|
return f'AS{self.asn}'
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
|
Reference in New Issue
Block a user