<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ### 1.自定義404頁面 ``` {% from 'common/_macros.html' import static %} <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>該頁面不存在喔</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="{{ static('front/css/404.css') }}"/> </head> <body> <div class="error wp960 auto"> <div class="img"> <img src="{{ url_for('static',filename='common/images/error.jpg') }}" /> </div> <div><a class="back" href="/">返回首頁</a></div> </div> </body> </html> ``` ### 2.自定義404視圖 ``` @app.errorhandler(404) def page_not_found(e): return render_template('front/404.html'), 404 ``` ### 3.帖子詳情頁面 ``` #@bp.route('/p/<post_id>/') @bp.route('/<name>/<post_id>/') def post_detail(name,post_id): post = PostModel.query.get(post_id) if not post: abort(404) return render_template('front/pdetail.html',post=post) ``` ### 4.帖子頁面 ``` {% extends "front/base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block head %} <script src="{{ static('ueditor/ueditor.config.js') }}"></script> <script src="{{ static('ueditor/ueditor.all.min.js') }}"></script> <script src="{{ static('front/js/pdetail.js') }}"></script> <link rel="stylesheet" href="{{ url_for('static',filename="front/css/pdetail.css") }}"> {% endblock %} {% block body %} <div class="lg-container"> <div class="post-container"> <h2>{{ post.title }}</h2> <p class="post-info-group"> <span>發表時間:{{ post.create_time }}</span> <span>作者:{{ post.author.username }}</span> <span>所屬板塊:{{ post.board.name }}</span> <span>閱讀數:{{ post.read_count }}</span> <span>評論數:0</span> </p> <article class="post-content" id="post-content" data-id="{{ post.id }}"> {{ post.content|safe }} </article> </div> </div> <div class="sm-container"> </div> {% endblock %} ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看