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

#9887: Add missing model documentation links

This commit is contained in:
jeremystretch
2022-11-15 11:00:13 -05:00
parent 4230162294
commit 640fd8045d
4 changed files with 32 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
from django.conf import settings
from django.core.validators import ValidationError
from django.db import models
from django.urls import reverse
@@ -116,6 +117,10 @@ class ConfigContext(WebhooksMixin, ChangeLoggedModel):
def get_absolute_url(self):
return reverse('extras:configcontext', kwargs={'pk': self.pk})
@property
def docs_url(self):
return f'{settings.STATIC_URL}docs/models/extras/configcontext/'
def clean(self):
super().clean()