From 7e7a1b8763022b4259e1f13b64df019bcfa012df Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 20 Oct 2025 13:39:23 +0100 Subject: [PATCH] Add edit link column to QuestionTable for improved item management --- sbas/tables.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbas/tables.py b/sbas/tables.py index f64c048a..1427eeb8 100644 --- a/sbas/tables.py +++ b/sbas/tables.py @@ -24,6 +24,10 @@ class QuestionTable(tables.Table): stem = tables.Column() answers = tables.TemplateColumn("
  1. {{ record.a_answer|safe}}
  2. {{ record.b_answer|safe}}
  3. {{ record.c_answer|safe}}
  4. {{ record.d_answer|safe}}
  5. {{ record.e_answer|safe}}
") + edit = tables.LinkColumn( + "sbas:question_update", text="Edit", args=[A("pk")], orderable=False + ) + class Meta: model = Question template_name = "django_tables2/bootstrap4.html" @@ -38,6 +42,7 @@ class QuestionTable(tables.Table): "created_date", "category", "author", + "edit" ) sequence = ("view", "stem", "answers")#, "exams") attrs = {"class": "table row-selector"}