Use strings to specify prerequisite models

This commit is contained in:
jeremystretch
2022-11-16 17:22:09 -05:00
parent cda6301e82
commit fa003f6764
12 changed files with 61 additions and 86 deletions

View File

@@ -1,4 +1,3 @@
from django.apps import apps
from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
@@ -193,10 +192,6 @@ class WirelessLink(WirelessAuthenticationBase, PrimaryModel):
def __str__(self):
return f'#{self.pk}'
@classmethod
def get_prerequisite_models(cls):
return [apps.get_model('dcim.Interface'), ]
def get_absolute_url(self):
return reverse('wireless:wirelesslink', args=[self.pk])