123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import django_tables2 as tables
- from dbsynce.models import *
- from webservice_running.models import *
- from django.contrib.auth import get_user_model
- from django.utils.html import format_html
- from django.utils.translation import gettext_lazy as _
- from dbsynce.lib.dicts import *
- class ResourcesLocalTable(tables.Table):
- id = tables.LinkColumn(
- 'webservice_running:resource_local_detail',
- args=[tables.A('pk')],
- verbose_name=_('ID'),
- attrs={
- "td": {"width": "5%"}
- }
- )
- # В user ссылка LinkColumn на страницу Аси "Информация о партнере" страница partner_information_form
-
- local_data = tables.Column(
- verbose_name=_('Локальные данные'),
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- resource.resource_type = tables.Column(
- verbose_name=_('Тип ресурса'),
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- class Meta:
- model = ResourceLocal
- attrs = {
- "class": "table table-layout-fixed"
- }
- exclude = (
- #'car_number',
- #'transmission_type',
- )
|