Pārlūkot izejas kodu

Truncate comments in JournalEntryTable

Jeremy Stretch 5 gadi atpakaļ
vecāks
revīzija
fe4bf62793
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      netbox/extras/tables.py

+ 3 - 0
netbox/extras/tables.py

@@ -134,6 +134,9 @@ class JournalEntryTable(ObjectJournalTable):
         orderable=False,
         verbose_name='Object'
     )
+    comments = tables.TemplateColumn(
+        template_code='{% load helpers %}{{ value|render_markdown|truncatewords_html:50 }}'
+    )
 
     class Meta(BaseTable.Meta):
         model = JournalEntry