mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Updating page title to include asdot notation
This commit is contained in:
parent
7c953b3070
commit
4d56f4972a
@ -125,7 +125,10 @@ class ASN(PrimaryModel):
|
|||||||
verbose_name_plural = 'ASNs'
|
verbose_name_plural = 'ASNs'
|
||||||
|
|
||||||
def __str__(self):
|
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):
|
def get_absolute_url(self):
|
||||||
return reverse('ipam:asn', args=[self.pk])
|
return reverse('ipam:asn', args=[self.pk])
|
||||||
|
Loading…
Reference in New Issue
Block a user