1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add UI views for custom links

This commit is contained in:
jeremystretch
2021-06-23 17:09:15 -04:00
parent b017927c69
commit 276ded0119
10 changed files with 292 additions and 60 deletions

View File

@@ -171,7 +171,7 @@ class Webhook(BigIDModel):
# Custom links
#
class CustomLink(BigIDModel):
class CustomLink(ChangeLoggedModel):
"""
A custom link to an external representation of a NetBox object. The link text and URL fields accept Jinja2 template
code to be rendered with an object as context.
@@ -221,6 +221,9 @@ class CustomLink(BigIDModel):
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse('extras:customlink', args=[self.pk])
#
# Export templates