Skip to content
Snippets Groups Projects

Resolve "Provide infrastructure for live documents"

Merged Jonathan Weth requested to merge 3-provide-infrastructure-for-live-documents into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
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
Loading