migrate examinations to generic model (and start adding mangament)
This commit is contained in:
+25
-1
@@ -7,7 +7,7 @@ from easy_thumbnails.files import get_thumbnailer
|
||||
|
||||
from easy_thumbnails.exceptions import InvalidImageFormatError
|
||||
|
||||
from generic.models import CidUser
|
||||
from generic.models import CidUser, Examination
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
@@ -259,3 +259,27 @@ class UserUserTable(tables.Table):
|
||||
record.username,
|
||||
record.email,
|
||||
)
|
||||
|
||||
class ExaminationTable(tables.Table):
|
||||
examination = tables.Column(
|
||||
linkify=("generic:examination_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="Condition",
|
||||
)
|
||||
|
||||
#edit = tables.LinkColumn(
|
||||
# "generic:examination_update", text="Edit", args=[A("pk")], orderable=False
|
||||
#)
|
||||
delete = tables.LinkColumn(
|
||||
"generic:examination_delete", text="Delete", args=[A("pk")], orderable=False
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
# synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
#synonym = tables.Column(empty_values=())
|
||||
#parent = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
class Meta:
|
||||
model = Examination
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
#fields = ("primary", "subspecialty")
|
||||
sequence = ("examination",)
|
||||
|
||||
Reference in New Issue
Block a user