Add Coordinate models, forms, views, templates,...
This commit is contained in:
1 parent
fe83a62615
commit
60c272acb7
18 files changed
+452
-9
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from netbox.tables import NetBoxTable, ChoiceFieldColumn
|
||||
from .models import CoordinateGroups, Coordinates
|
||||
|
||||
class CoordinateGroupListTable(NetBoxTable):
|
||||
name = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = CoordinateGroups
|
||||
fields = ('pk', 'name', 'description')
|
||||
default_columns = ('name', 'description')
|
||||
|
||||
class CoordinateListTable(NetBoxTable):
|
||||
group = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
|
||||
device = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = Coordinates
|
||||
fields = ('pk', 'group', 'device', 'x', 'y')
|
||||
default_columns = ('id', 'group', 'device', 'x', 'y')
|
||||
|
||||
Reference in new issue
Block a user