.
This commit is contained in:
+8
-2
@@ -1,3 +1,4 @@
|
||||
from django.utils.safestring import mark_safe
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import A
|
||||
|
||||
@@ -35,11 +36,13 @@ class QuestionTable(tables.Table):
|
||||
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
stem = tables.Column()
|
||||
|
||||
class Meta:
|
||||
model = Question
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = (
|
||||
"stem",
|
||||
#"stem",
|
||||
"a_answer",
|
||||
"b_answer",
|
||||
"c_answer",
|
||||
@@ -50,7 +53,10 @@ class QuestionTable(tables.Table):
|
||||
"category",
|
||||
"author",
|
||||
)
|
||||
sequence = ("view", "exams")
|
||||
sequence = ("view", "stem", "exams")
|
||||
|
||||
def render_stem(self, value):
|
||||
return mark_safe(value)
|
||||
|
||||
class UserAnswerTable(tables.Table):
|
||||
select = tables.CheckBoxColumn(accessor=("pk"))
|
||||
|
||||
Reference in New Issue
Block a user