This commit is contained in:
Ross
2021-02-08 11:15:46 +00:00
parent 643d3ca6c2
commit 2fdb4318ff
7 changed files with 110 additions and 39 deletions
+18 -1
View File
@@ -1,7 +1,7 @@
import django_tables2 as tables
from django_tables2.utils import A
from .models import AnatomyQuestion
from .models import AnatomyQuestion, CidUserAnswer
from django.utils.html import format_html
@@ -9,6 +9,23 @@ from easy_thumbnails.files import get_thumbnailer
from easy_thumbnails.exceptions import InvalidImageFormatError
#from generic.tables import UserAnswerTable
class AnatomyUserAnswerTable(tables.Table):
class Meta:
model = CidUserAnswer
template_name = "django_tables2/bootstrap4.html"
fields = (
"cid",
"question",
"answer",
#"answer_compare",
"exam",
"created",
"updated",
)
class ImageColumn(tables.Column):
def render(self, value):