repalce rapid - long
This commit is contained in:
+6
-6
@@ -1,7 +1,7 @@
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import A
|
||||
|
||||
from .models import Rapid
|
||||
from .models import Long
|
||||
|
||||
from django.utils.html import format_html
|
||||
|
||||
@@ -25,23 +25,23 @@ class ImageColumn(tables.Column):
|
||||
return format_html('<span title="{}">Invalid image url<span>', image_object)
|
||||
|
||||
|
||||
class RapidTable(tables.Table):
|
||||
edit = tables.LinkColumn('rapids:rapid_update',
|
||||
class LongTable(tables.Table):
|
||||
edit = tables.LinkColumn('longs:long_update',
|
||||
text='Edit',
|
||||
args=[A('pk')],
|
||||
orderable=False)
|
||||
view = tables.LinkColumn('rapids:rapid_detail',
|
||||
view = tables.LinkColumn('longs:long_detail',
|
||||
text='View',
|
||||
args=[A('pk')],
|
||||
orderable=False)
|
||||
clone = tables.LinkColumn('rapids:rapid_clone',
|
||||
clone = tables.LinkColumn('longs:long_clone',
|
||||
text='Clone',
|
||||
args=[A('pk')],
|
||||
orderable=False)
|
||||
images = ImageColumn("images", orderable=False)
|
||||
|
||||
class Meta:
|
||||
model = Rapid
|
||||
model = Long
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ("normal", "abnormality", "region", "examination",
|
||||
"laterality", "site", "created_date", "author")
|
||||
|
||||
Reference in New Issue
Block a user