Files
penracourses/rapids/tables.py
T
2021-01-18 11:18:07 +00:00

26 lines
946 B
Python
Executable File

import django_tables2 as tables
from django_tables2.utils import A
from .models import Rapid
class RapidTable(tables.Table):
edit = tables.LinkColumn('rapids:rapid_update',
text='Edit',
args=[A('pk')],
orderable=False)
view = tables.LinkColumn('rapids:rapid_detail',
text='View',
args=[A('pk')],
orderable=False)
clone = tables.LinkColumn('rapids:rapid_clone',
text='Clone',
args=[A('pk')],
orderable=False)
class Meta:
model = Rapid
template_name = "django_tables2/bootstrap4.html"
fields = ("normal", "abnormality", "region", "examination",
"laterality", "site", "created_date", "author")
sequence = ("view", )