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

@ -4,6 +4,7 @@ import decimal
import django_filters
from django import forms
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres.fields import ArrayField
from django.core.validators import RegexValidator, ValidationError
@ -179,6 +180,10 @@ class CustomField(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLogge
def get_absolute_url(self):
return reverse('extras:customfield', args=[self.pk])
@property
def docs_url(self):
return f'{settings.STATIC_URL}docs/models/extras/customfield/'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)