Skip to content
Snippets Groups Projects
Verified Commit be45ba11 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Show more information in the LiveDocument table

parent f3007ba0
No related branches found
No related tags found
1 merge request!16Resolve "Provide infrastructure for live documents"
This commit is part of merge request !16. Comments created here will be created in the context of that merge request.
from django.utils.translation import gettext as _
from django_tables2 import A, Column, LinkColumn, Table
from django_tables2 import A, BooleanColumn, Column, DateTimeColumn, LinkColumn, Table
class LiveDocumentTable(Table):
......@@ -12,6 +12,8 @@ class LiveDocumentTable(Table):
document_name = Column(accessor="pk")
name = LinkColumn("edit_live_document", args=[A("id")])
filename = LinkColumn("show_live_document", args=[A("slug")])
last_update = DateTimeColumn(accessor=A("last_update"))
last_update_triggered_manually = BooleanColumn()
edit = LinkColumn(
"edit_live_document",
args=[A("id")],
......@@ -29,3 +31,6 @@ class LiveDocumentTable(Table):
def render_document_name(self, value, record):
return record._meta.verbose_name
def value_last_update(self, value, record):
return record.last_update
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment