mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
27 lines
683 B
Python
27 lines
683 B
Python
from django.apps import AppConfig
|
|
|
|
from netbox import denormalized
|
|
|
|
|
|
class DCIMConfig(AppConfig):
|
|
name = "dcim"
|
|
verbose_name = "DCIM"
|
|
|
|
def ready(self):
|
|
import dcim.signals
|
|
from .models import CableTermination
|
|
|
|
# Register denormalized fields
|
|
denormalized.register(CableTermination, '_device', {
|
|
'_rack': 'rack',
|
|
'_location': 'location',
|
|
'_site': 'site',
|
|
})
|
|
denormalized.register(CableTermination, '_rack', {
|
|
'_location': 'location',
|
|
'_site': 'site',
|
|
})
|
|
denormalized.register(CableTermination, '_location', {
|
|
'_site': 'site',
|
|
})
|