.
This commit is contained in:
+7
-6
@@ -37,7 +37,9 @@ class QuestionTable(tables.Table):
|
|||||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||||
|
|
||||||
stem = tables.Column()
|
stem = tables.Column()
|
||||||
answers = tables.TemplateColumn("<ol type='A'><li>{{ record.a_answer|safe}}</li><li>{{ record.b_answer|safe}}</li><li>{{ record.c_answer|safe}}</li><li>{{ record.d_answer|safe}}</li><li>{{ record.e_answer|safe}}</li></ol>")
|
answers = tables.TemplateColumn(
|
||||||
|
"<ol type='A'><li>{{ record.a|safe}} : {{ record.a_answer|safe}}</li><li>{{ record.b|safe}} : {{ record.b_answer|safe}}</li><li>{{ record.c|safe}} : {{ record.c_answer|safe}}</li><li>{{ record.d|safe}} : {{ record.d_answer|safe}}</li><li>{{ record.e|safe}} : {{ record.e_answer|safe}}</li></ol>"
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Question
|
model = Question
|
||||||
@@ -65,10 +67,10 @@ class UserAnswerTable(tables.Table):
|
|||||||
# delete = tables.LinkColumn(
|
# delete = tables.LinkColumn(
|
||||||
# "physics:user_answer_delete", text="Delete", args=[A("pk")], orderable=False
|
# "physics:user_answer_delete", text="Delete", args=[A("pk")], orderable=False
|
||||||
# )
|
# )
|
||||||
view = tables.LinkColumn('physics:user_answer_view',
|
view = tables.LinkColumn(
|
||||||
text='View',
|
"physics:user_answer_view", text="View", args=[A("pk")], orderable=False
|
||||||
args=[A('pk')],
|
)
|
||||||
orderable=False)
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = CidUserAnswer
|
model = CidUserAnswer
|
||||||
template_name = "django_tables2/bootstrap4.html"
|
template_name = "django_tables2/bootstrap4.html"
|
||||||
@@ -81,4 +83,3 @@ class UserAnswerTable(tables.Table):
|
|||||||
"created",
|
"created",
|
||||||
"updated",
|
"updated",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user