start oef
This commit is contained in:
Executable
+35
@@ -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)
|
||||
Reference in New Issue
Block a user