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,7 +125,10 @@ class ASN(PrimaryModel):
|
||||
verbose_name_plural = 'ASNs'
|
||||
|
||||
def __str__(self):
|
||||
return f'AS{self.asn}'
|
||||
if self.asn > 65535:
|
||||
return 'AS{} ({}.{})'.format(self.asn, self.asn // 65536, self.asn % 65536)
|
||||
else:
|
||||
return f'AS{self.asn}'
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('ipam:asn', args=[self.pk])
|
||||
|
Reference in New Issue
Block a user