浏览代码

typo: context->content

SongZihuan 3 年之前
父节点
当前提交
649d931b40

+ 9 - 9
app/docx.py

@@ -15,7 +15,7 @@ docx = Blueprint("docx", __name__)
 
 
 class EditorMD(FlaskForm):
-    context = TextAreaField("博客内容", validators=[DataRequired(message="必须输入博客文章")])
+    content = TextAreaField("博客内容", validators=[DataRequired(message="必须输入博客文章")])
 
 
 class WriteBlogForm(EditorMD):
@@ -31,7 +31,7 @@ class WriteBlogForm(EditorMD):
     def __init__(self, default: bool = False, **kwargs):
         super().__init__(**kwargs)
         if default:
-            self.context.data = "# Blog Title\n## Blog subtitle\nHello, World"
+            self.content.data = "# Blog Title\n## Blog subtitle\nHello, World"
         archive = Archive.get_archive_list()
         self.archive_res = []
         self.archive_choices = [(-1, "None")]
@@ -58,11 +58,11 @@ class UpdateBlogForm(EditorMD):
         super().__init__(**kwargs)
         if blog is not None:
             self.blog_id.data = blog.blog_id
-            self.context.data = blog.context
+            self.content.data = blog.content
 
 
 class WriteCommentForm(FlaskForm):
-    context = TextAreaField("", description="评论正文",
+    content = TextAreaField("", description="评论正文",
                             validators=[DataRequired(message="请输入评论的内容"),
                                         Length(1, 100, message="请输入1-100个字的评论")])
     submit = SubmitField("评论")
@@ -147,7 +147,7 @@ def article_down_page():
         abort(404)
         return
 
-    response = make_response(article.context)
+    response = make_response(article.content)
     response.headers["Content-Disposition"] = f"attachment;filename={article.title.encode().decode('latin-1')}.md"
     app.HBlogFlask.print_load_page_log(f"download article (id: {blog_id})")
     return response
@@ -168,7 +168,7 @@ def create_docx_page():
             if i is not None:
                 archive.append(i)
 
-    if BlogArticle(None, current_user, title, subtitle, form.context.data, archive=archive).create():
+    if BlogArticle(None, current_user, title, subtitle, form.content.data, archive=archive).create():
         app.HBlogFlask.print_sys_opt_success_log("write blog")
         flash(f"博客 {title} 发表成功")
     else:
@@ -184,7 +184,7 @@ def create_docx_page():
 @app.role_required("WriteBlog", "write blog")
 def update_docx_page():
     form: UpdateBlogForm = g.form
-    if BlogArticle(form.blog_id.data, None, None, None, None).update(form.context.data):
+    if BlogArticle(form.blog_id.data, None, None, None, None).update(form.content.data):
         app.HBlogFlask.print_sys_opt_success_log("update blog")
         flash("博文更新成功")
     else:
@@ -217,8 +217,8 @@ def delete_blog_page():
 def comment_page():
     blog_id = int(request.args.get("blog", 1))
     form: WriteCommentForm = g.form
-    context = form.context.data
-    if Comment(None, blog_id, current_user, context).create():
+    content = form.content.data
+    if Comment(None, blog_id, current_user, content).create():
         app.HBlogFlask.print_user_opt_success_log("comment")
         flash("评论成功")
     else:

+ 3 - 3
app/msg.py

@@ -15,7 +15,7 @@ class WriteForm(FlaskForm):
     """
     写新内容表单
     """
-    context = TextAreaField("", description="留言正文",
+    content = TextAreaField("", description="留言正文",
                             validators=[
                                 DataRequired("请输入留言的内容"),
                                 Length(1, 100, message="留言长度1-100个字符")])
@@ -56,9 +56,9 @@ def msg_page():
 @app.role_required("WriteMsg", "write msg")
 def write_msg_page():
     form: WriteForm = g.form
-    context = form.context.data
+    content = form.content.data
     secret = form.secret.data
-    if Message(None, current_user, context, secret, None).create():
+    if Message(None, current_user, content, secret, None).create():
         app.HBlogFlask.print_user_opt_success_log("write msg")
         flash("留言成功")
     else:

+ 6 - 6
init.sql

@@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS blog -- 创建博客表
     Auth       INT      NOT NULL,                           -- 作者
     Title      char(20) NOT NULL,                           -- 标题
     SubTitle   char(20) NOT NULL,                           -- 副标题
-    Context    TEXT     NOT NULL,                           -- 内容
+    Content    TEXT     NOT NULL,                           -- 内容
     CreateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, -- 创建的时间
     UpdateTime DATETIME NOT NULL DEFAULT (CreateTime),      -- 创建的时间
     Top        BIT      NOT NULL DEFAULT 0,                 -- 置顶
@@ -109,7 +109,7 @@ SELECT blog.ID          AS BlogID,
        Auth,
        Title,
        SubTitle,
-       Context,
+       Content,
        CreateTime,
        UpdateTime,
        Top
@@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS comment -- 评论表
     ID         INT PRIMARY KEY AUTO_INCREMENT,              -- 评论 ID
     BlogID     INT      NOT NULL,                           -- 博客 ID
     Auth       INT      NOT NULL,                           -- 作者
-    Context    TEXT     NOT NULL,                           -- 内容
+    Content    TEXT     NOT NULL,                           -- 内容
     CreateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, -- 创建的时间
     UpdateTime DATETIME NOT NULL DEFAULT (CreateTime),      -- 创建的时间
     FOREIGN KEY (BlogID) REFERENCES blog (ID),
@@ -129,7 +129,7 @@ CREATE TABLE IF NOT EXISTS comment -- 评论表
 );
 
 CREATE VIEW comment_user AS
-SELECT comment.ID as CommentID, BlogID, Auth, user.Email as Email, Context, CreateTime, UpdateTime
+SELECT comment.ID as CommentID, BlogID, Auth, user.Email as Email, Content, CreateTime, UpdateTime
 FROM comment
          LEFT JOIN user on user.ID = comment.Auth
 ORDER BY UpdateTime DESC;
@@ -138,7 +138,7 @@ CREATE TABLE IF NOT EXISTS message -- 留言表
 (
     ID         INT PRIMARY KEY AUTO_INCREMENT,              -- 留言 ID
     Auth       INT      NOT NULL,                           -- 作者
-    Context    TEXT     NOT NULL,                           -- 内容
+    Content    TEXT     NOT NULL,                           -- 内容
     Secret     BIT      NOT NULL DEFAULT 0,                 -- 私密内容
     CreateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, -- 创建的时间
     UpdateTime DATETIME NOT NULL DEFAULT (CreateTime),      -- 创建的时间
@@ -147,7 +147,7 @@ CREATE TABLE IF NOT EXISTS message -- 留言表
 
 
 CREATE VIEW message_user AS
-SELECT message.ID as MsgID, Auth, user.Email as Email, Context, CreateTime, UpdateTime, Secret
+SELECT message.ID as MsgID, Auth, user.Email as Email, Content, CreateTime, UpdateTime, Secret
 FROM message
          LEFT JOIN user on user.ID = message.Auth
 ORDER BY UpdateTime DESC;

+ 8 - 8
object/blog.py

@@ -31,22 +31,22 @@ def load_blog_by_id(blog_id) -> "Optional[BlogArticle]":
 
     title = blog[1]
     subtitle = blog[2]
-    context = blog[3]
+    content = blog[3]
     update_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)
-    return BlogArticle(blog_id, auth, title, subtitle, context, update_time, create_time, top, comment, archive)
+    return BlogArticle(blog_id, auth, title, subtitle, content, update_time, create_time, top, comment, archive)
 
 
 class BlogArticle:
-    def __init__(self, blog_id, auth, title, subtitle, context, update_time=None, create_time=None, top=False, comment=None, archive=None):
+    def __init__(self, blog_id, auth, title, subtitle, content, update_time=None, create_time=None, top=False, comment=None, archive=None):
         self.blog_id = blog_id
         self.user = auth
         self.title = title
         self.subtitle = subtitle
-        self.context = context
+        self.content = content
         self.update_time = update_time
         self.create_time = create_time
         self.top = top
@@ -72,13 +72,13 @@ class BlogArticle:
     def create(self):
         if self.blog_id is not None:  # 只有 blog_id为None时才使用
             return False
-        return create_blog(self.user.get_user_id(), self.title, self.subtitle, self.context, self.archive)
+        return create_blog(self.user.get_user_id(), self.title, self.subtitle, self.content, self.archive)
 
     def delete(self):
         return delete_blog(self.blog_id)
 
-    def update(self, context: str):
-        if update_blog(self.blog_id, context):
-            self.context = context
+    def update(self, content: str):
+        if update_blog(self.blog_id, content):
+            self.content = content
             return True
         return False

+ 3 - 3
object/comment.py

@@ -16,11 +16,11 @@ class Comment:
     def __init__(self, comment_id,
                  blog_id: Optional[int],
                  auth: "Optional[object.user.User]",
-                 context: Optional[str], update_time=None):
+                 content: Optional[str], update_time=None):
         self.comment_id = comment_id
         self.blog_id = blog_id
         self.auth = auth
-        self.context = context
+        self.content = content
         self.update_time = update_time
 
     @staticmethod
@@ -28,7 +28,7 @@ class Comment:
         return get_user_comment_count(auth.get_user_id())
 
     def create(self):
-        return create_comment(self.blog_id, self.auth.get_user_id(), self.context)
+        return create_comment(self.blog_id, self.auth.get_user_id(), self.content)
 
     def delete(self):
         return delete_comment(self.comment_id)

+ 3 - 3
object/msg.py

@@ -13,10 +13,10 @@ def load_message_list(limit: Optional[int] = None, offset: Optional[int] = None,
 
 
 class Message:
-    def __init__(self, msg_id, auth: "Optional[object.user.User]", context, secret=False, update_time=None):
+    def __init__(self, msg_id, auth: "Optional[object.user.User]", content, secret=False, update_time=None):
         self.msg_id = msg_id
         self.auth = auth
-        self.context = context
+        self.content = content
         self.secret = secret
         self.update_time = update_time
 
@@ -27,7 +27,7 @@ class Message:
         return get_user_msg_count(auth.get_user_id())
 
     def create(self):
-        return create_msg(self.auth.get_user_id(), self.context, self.secret)
+        return create_msg(self.auth.get_user_id(), self.content, self.secret)
 
     def delete(self):
         return delete_msg(self.msg_id)

+ 8 - 8
sql/blog.py

@@ -3,14 +3,14 @@ from typing import Optional, List
 import object.archive
 
 
-def create_blog(auth_id: int, title: str, subtitle: str, context: str,
+def create_blog(auth_id: int, title: str, subtitle: str, content: str,
                 archive_list: List[object.archive.Archive]) -> bool:
     """ 写入新的blog """
     title = title.replace("'", "''")
     subtitle = subtitle.replace("'", "''")
-    context = context.replace("'", "''")
-    cur = db.insert(table="blog", columns=["Auth", "Title", "SubTitle", "Context"],
-                    values=f"{auth_id}, '{title}', '{subtitle}', '{context}'")
+    content = content.replace("'", "''")
+    cur = db.insert(table="blog", columns=["Auth", "Title", "SubTitle", "Content"],
+                    values=f"{auth_id}, '{title}', '{subtitle}', '{content}'")
     if cur is None or cur.rowcount == 0:
         return False
     blog_id = cur.lastrowid
@@ -22,11 +22,11 @@ def create_blog(auth_id: int, title: str, subtitle: str, context: str,
     return True
 
 
-def update_blog(blog_id: int, context: str) -> bool:
+def update_blog(blog_id: int, content: str) -> bool:
     """ 更新博客文章 """
-    context = context.replace("'", "''")
+    content = content.replace("'", "''")
     cur = db.update(table="blog",
-                    kw={"UpdateTime": "CURRENT_TIMESTAMP()", "Context": f"'{context}'"},
+                    kw={"UpdateTime": "CURRENT_TIMESTAMP()", "Content": f"'{content}'"},
                     where=f"ID={blog_id}")
     if cur is None or cur.rowcount != 1:
         return False
@@ -35,7 +35,7 @@ def update_blog(blog_id: int, context: str) -> bool:
 
 def read_blog(blog_id: int) -> list:
     """ 读取blog内容 """
-    cur = db.search(columns=["Auth", "Title", "SubTitle", "Context", "UpdateTime", "CreateTime", "Top"],
+    cur = db.search(columns=["Auth", "Title", "SubTitle", "Content", "UpdateTime", "CreateTime", "Top"],
                     table="blog",
                     where=f"ID={blog_id}")
     if cur is None or cur.rowcount == 0:

+ 5 - 5
sql/comment.py

@@ -3,7 +3,7 @@ from sql import db
 
 def read_comment(blog_id: int):
     """ 读取文章的 comment """
-    cur = db.search(columns=["CommentID", "Auth", "Email", "Context", "UpdateTime"],
+    cur = db.search(columns=["CommentID", "Auth", "Email", "Content", "UpdateTime"],
                     table="comment_user",
                     where=f"BlogID={blog_id}")
     if cur is None or cur.rowcount == 0:
@@ -11,12 +11,12 @@ def read_comment(blog_id: int):
     return cur.fetchall()
 
 
-def create_comment(blog_id: int, user_id: int, context: str):
+def create_comment(blog_id: int, user_id: int, content: str):
     """ 新建 comment """
-    context = context.replace("'", "''")
+    content = content.replace("'", "''")
     cur = db.insert(table="comment",
-                    columns=["BlogID", "Auth", "Context"],
-                    values=f"{blog_id}, {user_id}, '{context}'")
+                    columns=["BlogID", "Auth", "Content"],
+                    values=f"{blog_id}, {user_id}, '{content}'")
     if cur is None or cur.rowcount == 0:
         return False
     return True

+ 5 - 5
sql/msg.py

@@ -2,11 +2,11 @@ from sql import db
 from typing import Optional
 
 
-def create_msg(auth: int, context: str, secret: bool = False):
-    context = context.replace("'", "''")
+def create_msg(auth: int, content: str, secret: bool = False):
+    content = content.replace("'", "''")
     cur = db.insert(table="message",
-                    columns=["Auth", "Context", "Secret"],
-                    values=f"{auth}, '{context}', {1 if secret else 0}")
+                    columns=["Auth", "Content", "Secret"],
+                    values=f"{auth}, '{content}', {1 if secret else 0}")
     return cur is not None and cur.rowcount == 1
 
 
@@ -16,7 +16,7 @@ def read_msg(limit: Optional[int] = None, offset: Optional[int] = None, show_sec
     else:
         where = "Secret=0"
 
-    cur = db.search(columns=["MsgID", "Auth", "Email", "Context", "UpdateTime", "Secret"], table="message_user",
+    cur = db.search(columns=["MsgID", "Auth", "Email", "Content", "UpdateTime", "Secret"], table="message_user",
                     limit=limit,
                     where=where,
                     offset=offset)

+ 1 - 1
templates/about_me/about_me.html

@@ -6,7 +6,7 @@
     {{ super() }}
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12">

+ 1 - 1
templates/archive/archive.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/archive/archive.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     {% if form and current_user.check_role("WriteBlog") %}
         <div class="container">
             <div class="row">

+ 1 - 1
templates/auth/delete.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/delete.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         <div class="row">
             <div class="col-12 col-lg-6 offset-lg-3">

+ 1 - 1
templates/auth/login.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/login.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12 col-lg-6 offset-lg-3">

+ 1 - 1
templates/auth/passwd.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/passwd.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12 col-lg-6 offset-lg-3">

+ 1 - 1
templates/auth/register.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/register.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12 col-lg-6 offset-lg-3">

+ 1 - 1
templates/auth/role.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/role.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         <div class="row">
             <div class="col-12 col-lg-6 offset-lg-3">

+ 1 - 1
templates/auth/yours.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/auth/yours.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12 col-lg-6 offset-lg-3">

+ 7 - 7
templates/base.html

@@ -91,8 +91,8 @@
     </header>
 {% endblock %}
 
-<div id="context" class="mb-2">
-    {% block context %} {% endblock %}
+<div id="content" class="mb-2">
+    {% block content %} {% endblock %}
 </div>
 
 {% block javascript %}
@@ -110,22 +110,22 @@
     <script>
         function SetFooter (mutationsList, observer) {
             let foot = document.getElementById('foot')
-            let context_height = context.getBoundingClientRect().bottom
+            let content_height = content.getBoundingClientRect().bottom
             let win_height = 0
             if (window.innerHeight)
                 win_height = window.innerHeight;
             else if ((document.body) && (document.body.clientHeight))
                 win_height = document.body.clientHeight;
 
-            if (win_height - context_height - foot.clientHeight <= 0)
+            if (win_height - content_height - foot.clientHeight <= 0)
                 foot.style.marginTop = "0"
             else
-                foot.style.marginTop = (win_height - context_height - foot.clientHeight).toString() + "px"
+                foot.style.marginTop = (win_height - content_height - foot.clientHeight).toString() + "px"
         }
         let MutationObserver = window.MutationObserver;
         let observer = new MutationObserver(SetFooter);
-        let context = document.getElementById('context')
-        observer.observe(context, {
+        let content = document.getElementById('content')
+        observer.observe(content, {
             attributes: true, // 属性的变动
             subtree: true, // 是否将观察器应用于该节点的所有后代节点
         });

+ 6 - 6
templates/docx/article.html

@@ -8,7 +8,7 @@
     <link rel="stylesheet" href="{{ url_for('static', filename='editor.md/css/editormd.min.css') }}" />
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         {% if current_user.check_role("ReadBlog") %}
             {# 检查是否具有读取权限 #}
@@ -27,9 +27,9 @@
                             {{ view.blog_id() }}
                         {% endif %}
                         <div id="markdown-view">
-                            {{ view.context(class="form-control mb-2", style="display:none;") }}
+                            {{ view.content(class="form-control mb-2", style="display:none;") }}
                         </div>
-                        {% for error in view.context.errors %}
+                        {% for error in view.content.errors %}
                             <small class="text-danger form-text"> {{ error }} </small>
                         {% endfor %}
 
@@ -68,8 +68,8 @@
                     <section class="col-12 text-right">
                         <form action="{{ url_for('docx.comment_page', blog=article.blog_id) }}" method="post">
                             {{ form.hidden_tag() }}
-                            {{ form.context(class="form-control mb-2", rows="3") }}
-                            {% for error in form.context.errors %}
+                            {{ form.content(class="form-control mb-2", rows="3") }}
+                            {% for error in form.content.errors %}
                                 <small class="text-danger form-text text-left"> {{ error }} </small>
                             {% endfor %}
 
@@ -134,7 +134,7 @@
                                     <br>
                                     <small> {{ comment.update_time }} </small>
                                 </p>
-                                <p> {{ comment.context.replace('\n', '<br>') | safe  }} </p>
+                                <p> {{ comment.content.replace('\n', '<br>') | safe  }} </p>
                             </div>
                         </section>
                     {% endfor %}

+ 3 - 3
templates/docx/docx.html

@@ -8,7 +8,7 @@
     <link rel="stylesheet" href="{{ url_for('static', filename='editor.md/css/editormd.min.css') }}" />
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         {% if form and current_user.check_role("WriteBlog") %}
             {# 判断是否有权限写博客 #}
@@ -21,9 +21,9 @@
                             {{ macro.render_field(form.subtitle) }}
                             {{ macro.render_field(form.archive) }}
                             <div id="editor">
-                                {{ form.context(class="form-control mb-2", style="display:none;") }}
+                                {{ form.content(class="form-control mb-2", style="display:none;") }}
                             </div>
-                            {% for error in form.context.errors %}
+                            {% for error in form.content.errors %}
                                 <small class="text-danger form-text"> {{ error }} </small>
                             {% endfor %}
 

+ 1 - 1
templates/error.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/index/index.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         <div class="row">
             <div class="col-12 text-center">

+ 1 - 1
templates/index/hello.html

@@ -16,7 +16,7 @@
 
 {% block nav %} {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="title-section">
         <h1 id="title-1"> 欢迎,这里是{{ blog_name }} </h1>
         <form method="get" action=" {{ url_for('base.index_page') }} ">

+ 3 - 3
templates/index/index.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/index/index.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         <div class="row">
             <article class="col-12">
@@ -61,7 +61,7 @@
                                 {% endif %}
                                 <br> <small>
                                 {{ msg.update_time }} </small> </p>
-                            <p> {{ msg.context.replace('\n', '<br>') | safe }} </p>
+                            <p> {{ msg.content.replace('\n', '<br>') | safe }} </p>
                         </div>
                     {% endfor %}
                     </aside>
@@ -77,7 +77,7 @@
                                 {% endif %}
                                 <br> <small>
                                 {{ msg.update_time }} </small> </p>
-                            <p> {{ msg.context.replace('\n', '<br>') | safe }} </p>
+                            <p> {{ msg.content.replace('\n', '<br>') | safe }} </p>
                         </div>
                     {% endfor %}
                     </aside>

+ 4 - 4
templates/msg/msg.html

@@ -7,14 +7,14 @@
     <link href="{{ url_for('static', filename='styles/msg/msg.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
         <div class="row">
             <section class="col-12 text-right">
                 <form class="writer clearfix" action="{{ url_for('msg.write_msg_page', page=page) }}" method="post">
                     {{ form.hidden_tag() }}
-                    {{ form.context(class="form-control mb-2", rows="5") }}
-                    {% for error in form.context.errors %}
+                    {{ form.content(class="form-control mb-2", rows="5") }}
+                    {% for error in form.content.errors %}
                         <small class="text-danger form-text text-left"> {{ error }} </small>
                     {% endfor %}
                     {{ form.secret() }} {{ form.secret.label }}
@@ -85,7 +85,7 @@
                                     {% endif %}
                                 </small>
                             </p>
-                            <p> {{ msg.context.replace('\n', '<br>') | safe }} </p>
+                            <p> {{ msg.content.replace('\n', '<br>') | safe }} </p>
                         </div>
                     {% endfor %}
                 </section>

+ 1 - 1
templates/oss/upload.html

@@ -7,7 +7,7 @@
     <link href="{{ url_for('static', filename='styles/oss/upload.css') }}" rel="stylesheet">
 {% endblock %}
 
-{% block context %}
+{% block content %}
     <section id="base" class="container mt-3">
     <div class="row">
         <div class="col-12 col-lg-6 offset-lg-3">