start oef

This commit is contained in:
Ross
2024-10-07 17:10:39 +01:00
parent 3f5f39c41c
commit 1e55d195e9
24 changed files with 468 additions and 0 deletions
Executable
+35
View File
@@ -0,0 +1,35 @@
import django_tables2 as tables
from django_tables2.utils import A
from generic.tables import SeriesImageColumn
from .models import (
Entry,
Formats
)
from django.utils.html import format_html
class EntryTable(tables.Table):
edit = tables.LinkColumn(
"oef:entry_update", text="Edit", args=[A("pk")], orderable=False
)
class Meta:
model = Entry
template_name = "django_tables2/bootstrap4.html"
fields = (
"modality",
"exam_code",
"exam_name",
"questions",
"comments",
)
def render_questions(self, value):
return format_html("<pre>{}</pre>", value)