Browse Source

feat: 博文页面显示更新时间

SongZihuan 3 years ago
parent
commit
9d101c846d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      object/blog.py
  2. 1 1
      templates/docx/article.html

+ 1 - 1
object/blog.py

@@ -33,7 +33,7 @@ def load_blog_by_id(blog_id) -> "Optional[BlogArticle]":
     subtitle = blog[2]
     context = blog[3]
     update_time = blog[4]
-    create_time = blog[4]
+    create_time = blog[5]
     top = blog[6]
     comment = object.comment.load_comment_list(blog_id)
     archive = object.archive.Archive.get_blog_archive(blog_id)

+ 1 - 1
templates/docx/article.html

@@ -14,7 +14,7 @@
             {# 检查是否具有读取权限 #}
             <div class="row">
                 <article class="col-12">
-                    <h1> {{ article.title }} <small> {{ article.subtitle }} <small> {{ article.update_time}} </small> </small> </h1>
+                    <h1> {{ article.title }} <small> {{ article.subtitle }} <small> {{ article.update_time}} / {{ article.create_time}} </small> </small> </h1>
                     {% for archive in article.archive %}
                         <span class="badge badge-info"> {{ archive.name }} </span>
                     {% endfor %}