From 7d8d1151ef5910e7b491b150df01626d729560c6 Mon Sep 17 00:00:00 2001 From: yangjian Date: Thu, 5 Nov 2020 22:27:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DDjango2.1=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=8B=E6=96=87=E9=9B=86=E9=A1=B5404=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/app_doc/project.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/template/app_doc/project.html b/template/app_doc/project.html index eac1607..fe1a824 100644 --- a/template/app_doc/project.html +++ b/template/app_doc/project.html @@ -53,7 +53,13 @@ {% for doc in new_docs %}

{{doc.name}}

-

{{ doc.pre_content | slice:200 }}

+

+ {% if doc.pre_content|length > 200 %} + {{ doc.pre_content|truncatechars:200 }}…… + {% else %} + {{ doc.pre_content }} + {% endif %} +

{% if doc.create_user.first_name != '' %} {{doc.create_user.first_name}} {% else %} {{doc.create_user}}{% endif %} - {{doc.modify_time}}