Refactor table row selection logic and remove associated CSS styles for improved clarity and maintainability

This commit is contained in:
Ross
2025-11-01 21:04:01 +00:00
parent cbf4c3497d
commit 62c26d199e
3 changed files with 3 additions and 47 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import django_tables2 as tables
from django_tables2.utils import A
from generic.tables import SeriesImageColumn
from generic.tables import SeriesImageColumn, SelectionTable
from .models import (
Case,
@@ -25,7 +25,7 @@ from easy_thumbnails.exceptions import InvalidImageFormatError
from django.db.models import Prefetch
class CaseTable(tables.Table):
class CaseTable(SelectionTable):
def __init__(self, data=None, *args, **kwargs):
# Optimize prefetching for casecollection_set
#case_collections_prefetch = Prefetch(
@@ -190,7 +190,7 @@ class CaseTable(tables.Table):
)
sequence = ("view", )
order_by = "-created_date"
attrs = {"class": "table row-selector"}
attrs = {"class": "table"}