network_inventory/nets/tables.py

25 lines
554 B
Python
Raw Normal View History

2020-01-10 00:01:06 +01:00
import django_tables2 as tables
from core.tables import CoreTable
2020-01-10 00:01:06 +01:00
from devices.models import DeviceInNet
from .models import Net
class NetsTable(CoreTable):
2020-01-10 00:01:06 +01:00
id = tables.Column(visible=False)
name = tables.Column('Net', linkify=True)
customer = tables.Column('Customer', linkify=True)
class Meta(CoreTable.Meta):
2020-01-10 00:01:06 +01:00
model = Net
class NetDetailTable(CoreTable):
2020-02-15 18:50:51 +01:00
device = tables.Column(linkify=True)
2020-01-10 00:01:06 +01:00
ip = tables.Column()
net = tables.Column(visible=False)
class Meta(CoreTable.Meta):
2020-01-10 00:01:06 +01:00
model = DeviceInNet