mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 04:42:22 -06:00
Clean up limit_to for ForeignKeys referencing ContentType
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
|
||||
# Models which support custom fields
|
||||
CUSTOMFIELD_MODELS = (
|
||||
'provider', 'circuit', # Circuits
|
||||
'site', 'rack', 'devicetype', 'device', # DCIM
|
||||
'aggregate', 'prefix', 'ipaddress', 'vlan', 'vrf', 'service', # IPAM
|
||||
'secret', # Secrets
|
||||
'tenant', # Tenancy
|
||||
'cluster', 'virtualmachine', # Virtualization
|
||||
)
|
||||
CUSTOMFIELD_MODELS = [
|
||||
'circuits.circuit',
|
||||
'circuits.provider',
|
||||
'dcim.device',
|
||||
'dcim.devicetype',
|
||||
'dcim.powerfeed',
|
||||
'dcim.rack',
|
||||
'dcim.site',
|
||||
'ipam.aggregate',
|
||||
'ipam.ipaddress',
|
||||
'ipam.prefix',
|
||||
'ipam.service',
|
||||
'ipam.vlan',
|
||||
'ipam.vrf',
|
||||
'secrets.secret',
|
||||
'tenancy.tenant',
|
||||
'virtualization.cluster',
|
||||
'virtualization.virtualmachine',
|
||||
]
|
||||
|
||||
# Custom field types
|
||||
CF_TYPE_TEXT = 100
|
||||
@@ -36,7 +47,7 @@ CF_FILTER_CHOICES = (
|
||||
)
|
||||
|
||||
# Custom links
|
||||
CUSTOM_LINK_MODELS = [
|
||||
CUSTOMLINK_MODELS = [
|
||||
'circuits.circuit',
|
||||
'circuits.provider',
|
||||
'dcim.cable',
|
||||
@@ -87,13 +98,32 @@ GRAPH_TYPE_CHOICES = (
|
||||
|
||||
# Models which support export templates
|
||||
EXPORTTEMPLATE_MODELS = [
|
||||
'provider', 'circuit', # Circuits
|
||||
'site', 'region', 'rack', 'rackgroup', 'manufacturer', 'devicetype', 'device', # DCIM
|
||||
'consoleport', 'powerport', 'interface', 'cable', 'virtualchassis', # DCIM
|
||||
'aggregate', 'prefix', 'ipaddress', 'vlan', 'vrf', 'service', # IPAM
|
||||
'secret', # Secrets
|
||||
'tenant', # Tenancy
|
||||
'cluster', 'virtualmachine', # Virtualization
|
||||
'circuits.circuit',
|
||||
'circuits.provider',
|
||||
'dcim.cable',
|
||||
'dcim.consoleport',
|
||||
'dcim.device',
|
||||
'dcim.devicetype',
|
||||
'dcim.interface',
|
||||
'dcim.manufacturer',
|
||||
'dcim.powerpanel',
|
||||
'dcim.powerport',
|
||||
'dcim.powerfeed',
|
||||
'dcim.rack',
|
||||
'dcim.rackgroup',
|
||||
'dcim.region',
|
||||
'dcim.site',
|
||||
'dcim.virtualchassis',
|
||||
'ipam.aggregate',
|
||||
'ipam.ipaddress',
|
||||
'ipam.prefix',
|
||||
'ipam.service',
|
||||
'ipam.vlan',
|
||||
'ipam.vrf',
|
||||
'secrets.secret',
|
||||
'tenancy.tenant',
|
||||
'virtualization.cluster',
|
||||
'virtualization.virtualmachine',
|
||||
]
|
||||
|
||||
# ExportTemplate language choices
|
||||
|
||||
Reference in New Issue
Block a user