From 0f7ed2958969af842c94e29609867d393cee0216 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 5 Dec 2021 15:01:13 +0000 Subject: [PATCH] . --- atlas/tables.py | 9 +++++---- atlas/views.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/atlas/tables.py b/atlas/tables.py index 7b1010c1..ab55acaa 100755 --- a/atlas/tables.py +++ b/atlas/tables.py @@ -57,7 +57,7 @@ class SeriesImageColumn(tables.Column): ) -class AtlasTable(tables.Table): +class CaseTable(tables.Table): edit = tables.LinkColumn( "atlas:case_update", text="Edit", args=[A("pk")], orderable=False ) @@ -72,15 +72,14 @@ class AtlasTable(tables.Table): ) series = AtlasImageColumn("Images", orderable=False) - # series = tables.ManyToManyColumn(verbose_name="Exams") - exams = tables.ManyToManyColumn(verbose_name="Exams") + differential = tables.ManyToManyColumn(verbose_name="Differential") selection = tables.CheckBoxColumn(accessor="pk", orderable=False) class Meta: model = Case template_name = "django_tables2/bootstrap4.html" - fields = ("title", "description", "history", "created_date", "author") + fields = ("title", "description", "history", "condition", "created_date", "author") sequence = ("view", "series", "exams") @@ -117,6 +116,8 @@ class SeriesTable(tables.Table): selection = tables.CheckBoxColumn(accessor="pk", orderable=False) case = tables.ManyToManyColumn(verbose_name="Cases") + findings = tables.ManyToManyColumn(verbose_name="Findings") + structures = tables.ManyToManyColumn(verbose_name="Structures") class Meta: model = Series diff --git a/atlas/views.py b/atlas/views.py index 25bef25a..5abd79b5 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -45,7 +45,7 @@ from .models import ( SeriesFinding, SeriesImage, ) -from .tables import AtlasTable, SeriesTable +from .tables import CaseTable, SeriesTable from .filters import AtlasFilter, SeriesFilter from django_tables2 import SingleTableView, SingleTableMixin @@ -477,7 +477,7 @@ def get_examination_id(request): class CaseView(LoginRequiredMixin, SingleTableMixin, FilterView): model = Case - table_class = AtlasTable + table_class = CaseTable template_name = "atlas/view.html" filterset_class = AtlasFilter