mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-30 05:01:05 +02:00
29 lines
806 B
Python
29 lines
806 B
Python
import django_tables2 as tables
|
|
|
|
from core.tables import CoreTable
|
|
|
|
from .models import ComputerLicense
|
|
from .models import UserLicense
|
|
|
|
|
|
class UserLicensesTable(CoreTable):
|
|
id = tables.Column(visible=False)
|
|
license_ptr = tables.Column(visible=False)
|
|
customer = tables.Column('Customer', linkify=True)
|
|
used_licenses = tables.Column()
|
|
user = tables.ManyToManyColumn(linkify_item=True)
|
|
|
|
class Meta(CoreTable.Meta):
|
|
model = UserLicense
|
|
|
|
|
|
class ComputerLicensesTable(CoreTable):
|
|
id = tables.Column(visible=False)
|
|
license_ptr = tables.Column(visible=False)
|
|
customer = tables.Column('Customer', linkify=True)
|
|
used_licenses = tables.Column()
|
|
computer = tables.ManyToManyColumn(linkify_item=True)
|
|
|
|
class Meta(CoreTable.Meta):
|
|
model = ComputerLicense
|