{"id":6688,"date":"2021-09-23T20:21:00","date_gmt":"2021-09-23T12:21:00","guid":{"rendered":"https:\/\/vip.fxxkpython.com\/?p=6688"},"modified":"2021-09-25T20:30:40","modified_gmt":"2021-09-25T12:30:40","slug":"%e4%bd%bf%e7%94%a8-python-%e4%bb%8e-0-%e5%bc%80%e5%8f%91%e5%b1%9e%e4%ba%8e%e4%bd%a0%e7%9a%84%e4%b8%aa%e4%ba%ba%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f-26-%e8%ae%a9%e4%bd%a0%e7%9a%84%e5%89%8d%e7%ab%af","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=6688","title":{"rendered":"\u4f7f\u7528 Python \u4ece 0 \u5f00\u53d1\u5c5e\u4e8e\u4f60\u7684\u4e2a\u4eba\u7ba1\u7406\u7cfb\u7edf 26 | \u8ba9\u4f60\u7684\u524d\u7aef\u9875\u9762\u7ed3\u6784\u8db3\u591f\u6e05\u6670\u53ef\u6269\u5c55"},"content":{"rendered":"\n<p>\u4e4b\u524d\uff0c\u6211\u7ed9\u4f60\u5206\u4eab\u4e86 <a href=\"https:\/\/vip.fxxkpython.com\/?p=6415\">bootstrap \u7684\u9759\u6001\u6a21\u677f\u6587\u4ef6<\/a>\uff0c\u5e76\u4e14\u4e5f\u7ed9\u4f60\u8bb2\u4e86\u6a21\u677f\u5f15\u64ce\u7684<a href=\"https:\/\/vip.fxxkpython.com\/?p=6405\">\u5e38\u7528\u64cd\u4f5c<\/a>\uff0c\u4f46\u53ef\u80fd\u4f60\u5728\u5b9e\u9645\u5f15\u7528\u7ed3\u6784\u548c\u5212\u5206\u8fd8\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u8fd9\u7bc7\u6211\u8981\u7ed9\u4f60\u4e00\u4e2a\u6e05\u6670\u7684\u68b3\u7406\u524d\u7aef\u9875\u9762\u7ed3\u6784\u548c\u601d\u8def\uff0c\u901a\u8fc7\u8fd9\u7bc7\u4f60\u53ef\u4ee5\u6e05\u6670\u7684\u628a\u81ea\u5df1\u7684\u524d\u7aef\u9875\u9762\u7ed3\u6784\u6574\u7406\u597d\uff0c\u5e76\u4e14\uff0c\u5f80\u540e\u6269\u5c55\u7684\u65f6\u5019\uff0c\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n\n\n\n<p>\u5f53\u4f60\u4e0b\u8f7d\u4e86\u6a21\u677f\u6587\u4ef6\uff0c\u653e\u5230\u4f60\u7684 templates \u65f6\uff0c\u8fd9\u4e9b\u9759\u6001\u8d44\u6e90\u6587\u4ef6\u90fd\u662f\u72ec\u7acb\u7684\uff08\u5373\u6ca1\u6709\u4e92\u76f8\u5f15\u7528\uff09\uff0c\u5176\u4e2d\u6709\u4e00\u4e9b\u662f\u4f60\u4e0d\u9700\u8981\u7684\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5220\u9664\uff0c\u6216\u8005\u4f60\u53ef\u4ee5\u76f4\u63a5\u6311\u9009\u90a3\u4e9b\u9002\u5408\u4f60\u7684\u9875\u9762\u653e\u5165 templates \u76ee\u5f55\u4e2d\uff0c\u800c\u5728\u8fd9\u91cc\u9762\u7684\u6587\u4ef6\uff0c\u5176\u4e2d\u4e5f\u6709\u5f88\u591a\u662f\u91cd\u590d\u4f7f\u7528\u5230\u7684\uff0c\u6bd4\u5982 js\uff0ccss \u7684\u5f15\u5165\uff0c\u5bfc\u822a\uff0c\u83dc\u5355\u680f\uff0c\u9875\u811a\u7b49\u3002<\/p>\n\n\n\n<h2>\u628a\u91cd\u590d\u7684\u9875\u9762\u72ec\u7acb\u51fa\u6765<\/h2>\n\n\n\n<p>\u6253\u5f00\u4f60\u7684 index.html\uff0c\u628a\u90a3\u4e9b\u91cd\u590d\u7684\u7ed3\u6784\u72ec\u7acb\u5f00\u6765\uff0c\u8ba9\u5b83\u4eec\u6210\u4e3a\u4e00\u4e2a\u4e2a\u5355\u72ec\u7684\u6a21\u5757\u3002<\/p>\n\n\n\n<h3>header.html<\/h3>\n\n\n\n<p>\u6bcf\u4e2a\u9875\u9762\u90fd\u9700\u8981\u91cd\u590d\u4f7f\u7528\u5230 &lt;head>\uff0c\u90a3\u4e48\u5c31\u76f4\u63a5\u521b\u5efa\u4e00\u4e2a header \u6a21\u5757\uff0c\u4e5f\u5c31\u662f header.html\uff1a<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;header.html&quot;,&quot;wpum_restrict_type&quot;:&quot;wpum_restrict_type_state&quot;,&quot;wpum_hide_state_in&quot;:false,&quot;wpum_hide_state_out&quot;:false,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">\n&lt;head&gt;\n\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;\n    &lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;\n    &lt;meta name=&quot;author&quot; content=&quot;&quot;&gt;\n\n    &lt;title&gt;{% block title %}\u6211\u7684\u4eba\u751f\u7ba1\u7406{% endblock title%}&lt;\/title&gt;\n\n    &lt;!-- Custom fonts for this template--&gt;\n    &lt;link href=&quot;{{ url_for('static', filename='vendor\/fontawesome-free\/css\/all.min.css') }}&quot; rel=&quot;stylesheet&quot; type=&quot;text\/css&quot;&gt;\n    &lt;link\n        href=&quot;https:\/\/fonts.googleapis.com\/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&quot;\n        rel=&quot;stylesheet&quot;&gt;\n    &lt;!-- Custom styles for this template--&gt;\n    &lt;link href=&quot;{{ url_for('static', filename='css\/sb-admin-2.min.css') }}&quot; rel=&quot;stylesheet&quot;&gt;\n\n&lt;\/head&gt;\n\n<\/pre><\/div>\n\n\n\n<h3>footer.html<\/h3>\n\n\n\n<p>\u540c\u6837\u7684\uff0c\u9875\u811a\u4e5f\u662f\u88ab\u91cd\u590d\u4f7f\u7528\u7684\uff0c\u62bd\u53d6\u51fa\u6765\uff1a<div style=\"text-align:center;border:1px dashed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;\">\u672c\u6587\u9690\u85cf\u5185\u5bb9 <a href=\"https:\/\/vip.fxxkpython.com\/wp-login.php?redirect_to=https%3A%2F%2Fvip.fxxkpython.com%2F%3Fp%3D6688\">\u767b\u9646<\/a> \u540e\u624d\u53ef\u4ee5\u6d4f\u89c8<\/div>\u6211\u4eec\u4ee5 index.html \u4e3a\u4f8b\uff0c\u4f7f\u7528 extends \u6765\u7ee7\u627f\u57fa\u672c\u6a21\u5757\uff1a<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;index.html&quot;,&quot;wpum_restrict_type&quot;:&quot;wpum_restrict_type_state&quot;,&quot;wpum_hide_state_in&quot;:false,&quot;wpum_hide_state_out&quot;:false,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">\n{% extends 'base.html'%}\n&lt;!-- Page Wrapper --&gt;\n&lt;div id=&quot;wrapper&quot;&gt;\n    {% block main%}\n    {% include 'sidebar.html' %}\n\t\t....\n        ....\n    {% endblock main %}<\/pre><\/div>\n\n\n\n<p>\u5f53\u4f60\u7ee7\u627f\u4e86 base.html \u540e\uff0c\u4f60\u53ea\u9700\u8981\u5173\u5fc3 index \u8fd9\u4e2a\u81ea\u6a21\u5757\u4e2d\u7279\u6709\u7684\u5185\u5bb9\uff0c\u5728\u4f60\u5b9a\u4e49\u7684 block \u4e0b\u5199\u4f60\u7279\u5b9a\u7684\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u662f\u4e0d\u662f\u6e05\u6670\u4e86\uff1a<\/p>\n\n\n\n<ul><li>\u62bd\u53d6\u516c\u7528\u7684\u7ed3\u6784\uff0c\u72ec\u7acb\u6210\u6a21\u5757<\/li><li>\u5728\u9700\u8981\u7684\u7684\u5730\u65b9 include \u5b83\u4eec<\/li><li>\u5b9a\u4e49\u4e00\u4e2a\u6700\u57fa\u672c\u7684\u6846\u67b6\u7ed3\u6784<\/li><li>\u5176\u5b83\u9875\u9762 extends \u7ee7\u627f\u57fa\u672c\u6a21\u5757\u4ece\u800c\u53ea\u5173\u5fc3\u7279\u6709\u7684\u5185\u5bb9<\/li><\/ul>\n\n\n\n<p>\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u4f60\u628a\u5171\u6709\u7684\u6a21\u5757\u62bd\u53d6\u51fa\u6765\uff0c\u9700\u8981\u7684\u65f6\u5019 include \u5230\u4f60\u9700\u8981\u7684\u9875\u9762\u4e2d\u3002\u901a\u8fc7\u7ee7\u627f\u7684\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u6269\u5c55\u6bcf\u4e00\u4e2a\u9875\u9762\uff0c\u4f60\u53ea\u9700\u8981\u5173\u5fc3\u8fd9\u4e2a\u9875\u9762\u8be5\u6709\u7684\u5185\u5bb9\uff0c\u81f3\u4e8e\u5176\u4ed6\u7684\u9759\u6001\u8d44\u6e90\u5bfc\u5165\u7b49\uff0c\u5728\u57fa\u7840\u6a21\u5757\u5df2\u7ecf\u505a\u597d\u4e86\uff0c\u5c31\u4e0d\u9700\u8981\u518d\u5173\u5fc3\u4e86\u3002\u53c8\uff0c\u4f60\u9700\u8981\u6dfb\u52a0\u4ec0\u4e48\u529f\u80fd\u5462\uff0c\u53ea\u9700\u8981\u5199\u4e00\u6b21\uff0c\u6bd4\u5982\u6dfb\u52a0\u83dc\u5355\uff0c\u5728 sidebar \u4e2d\u6dfb\u52a0\u5373\u53ef\uff0c\u5176\u4ed6\u5f15\u7528\u5230\u7684\u9875\u9762\u4f1a\u81ea\u52a8\u5c55\u73b0\u3002<\/p>\n\n\n\n<p>\u90a3\u4e48\u73b0\u5728\u7684\u4f60\uff0c\u5e94\u8be5\u53ef\u4ee5\u5b8c\u5168\u7684\u901a\u8fc7\u81ea\u5df1\uff0c\u53bb\u4fee\u6539\uff0c\u53bb\u6dfb\u52a0\uff0c\u53bb\u4f18\u5316\u4f60\u7684\u524d\u7aef\u9875\u9762\u7ed3\u6784\uff0c\u800c\u540e\uff0c\u4f60\u60f3\u8981\u5b9e\u73b0\u4ec0\u4e48\uff0c\u5c31\u5728\u539f\u6709\u7684\u7ed3\u6784\u4e0a\uff0c\u76f4\u63a5\u6269\u5c55\u51fa\u6765\u5c31\u884c\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\uff0c\u6211\u7ed9\u4f60\u5206\u4eab\u4e86 bootstrap \u7684\u9759\u6001\u6a21\u677f\u6587\u4ef6\uff0c\u5e76\u4e14\u4e5f\u7ed9\u4f60\u8bb2\u4e86\u6a21\u677f\u5f15\u64ce\u7684\u5e38\u7528\u64cd\u4f5c\uff0c\u4f46\u53ef\u80fd\u4f60\u5728\u5b9e\u9645\u5f15\u7528\u7ed3\u6784\u548c\u5212\u5206\u8fd8\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u8fd9\u7bc7\u6211\u8981\u7ed9\u4f60\u4e00\u4e2a\u6e05\u6670\u7684\u68b3\u7406\u524d\u7aef\u9875\u9762\u7ed3\u6784\u548c\u601d\u8def\uff0c\u901a\u8fc7\u8fd9\u7bc7\u4f60\u53ef\u4ee5\u6e05\u6670\u7684\u628a\u81ea\u5df1\u7684\u524d\u7aef\u9875\u9762\u7ed3\u6784\u6574\u7406\u597d\uff0c\u5e76\u4e14\uff0c\u5f80\u540e\u6269\u5c55\u7684\u65f6\u5019&hellip;<\/p>\n","protected":false},"author":1,"featured_media":6689,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[99],"tags":[626,627,94],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/6688"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6688"}],"version-history":[{"count":1,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/6688\/revisions"}],"predecessor-version":[{"id":6690,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/6688\/revisions\/6690"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/media\/6689"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}