.
This commit is contained in:
+25
-28
@@ -7,6 +7,8 @@ from easy_thumbnails.files import get_thumbnailer
|
||||
|
||||
from easy_thumbnails.exceptions import InvalidImageFormatError
|
||||
|
||||
from generic.models import CidUser
|
||||
|
||||
|
||||
class ImageColumn(tables.Column):
|
||||
def render(self, value):
|
||||
@@ -17,31 +19,26 @@ class ImageColumn(tables.Column):
|
||||
return format_html('<span title="{}">Invalid image url<span>', value)
|
||||
|
||||
|
||||
#class UserAnswerTable(tables.Table):
|
||||
# #edit = tables.LinkColumn(
|
||||
# # "anatomy:anatomy_question_update", text="Edit", args=[A("pk")], orderable=False
|
||||
# #)
|
||||
# #view = tables.LinkColumn(
|
||||
# # "anatomy:question_detail", text="View", args=[A("pk")], orderable=False
|
||||
# #)
|
||||
# #image = ImageColumn("image", orderable=False)
|
||||
# # clone = tables.LinkColumn('anatomy:anatomy_question_clone',
|
||||
# # text='Clone',
|
||||
# # args=[A('pk')],
|
||||
# # orderable=False)
|
||||
# #exams = tables.ManyToManyColumn(verbose_name="Exams")
|
||||
#
|
||||
# class Meta:
|
||||
# #model = AnatomyQuestion
|
||||
# abstract = True
|
||||
# template_name = "django_tables2/bootstrap4.html"
|
||||
# fields = (
|
||||
# "cid",
|
||||
# "question",
|
||||
# "answer",
|
||||
# #"answer_compare",
|
||||
# "exam",
|
||||
# "created",
|
||||
# "updated",
|
||||
# )
|
||||
# #sequence = ("view")
|
||||
class CidUserTable(tables.Table):
|
||||
#edit = tables.LinkColumn(
|
||||
# "anatomy:anatomy_question_update", text="Edit", args=[A("pk")], orderable=False
|
||||
#)
|
||||
#view = tables.LinkColumn(
|
||||
# "anatomy:question_detail", text="View", args=[A("pk")], orderable=False
|
||||
#)
|
||||
#image = ImageColumn("image", orderable=False)
|
||||
# clone = tables.LinkColumn('anatomy:anatomy_question_clone',
|
||||
# text='Clone',
|
||||
# args=[A('pk')],
|
||||
# orderable=False)
|
||||
physics_exams = tables.ManyToManyColumn(verbose_name="Physics Exams")
|
||||
|
||||
class Meta:
|
||||
model = CidUser
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = (
|
||||
"cid",
|
||||
"passcode",
|
||||
"active",
|
||||
)
|
||||
#sequence = ("view")
|
||||
Reference in New Issue
Block a user