{"id":1098570,"date":"2025-01-08T15:22:23","date_gmt":"2025-01-08T07:22:23","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1098570.html"},"modified":"2025-01-08T15:22:26","modified_gmt":"2025-01-08T07:22:26","slug":"python%e5%a6%82%e4%bd%95%e5%86%99%e4%b8%80%e4%b8%aa%e7%bd%91%e9%a1%b5-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1098570.html","title":{"rendered":"python\u5982\u4f55\u5199\u4e00\u4e2a\u7f51\u9875"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25062717\/581acc7c-f68a-40f9-abb4-86c9ab7f5084.webp\" alt=\"python\u5982\u4f55\u5199\u4e00\u4e2a\u7f51\u9875\" \/><\/p>\n<p><p> <strong>Python \u5982\u4f55\u5199\u4e00\u4e2a\u7f51\u9875<\/strong>\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u7b49Web\u6846\u67b6\uff0c\u6216\u8005\u76f4\u63a5\u751f\u6210\u9759\u6001HTML\u6587\u4ef6\u3002<strong>\u4f7f\u7528Flask\u3001\u4f7f\u7528Django\u3001\u751f\u6210\u9759\u6001HTML\u6587\u4ef6<\/strong>\u662f\u5e38\u89c1\u7684\u4e09\u79cd\u65b9\u6cd5\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u521b\u5efa\u4e00\u4e2a\u7f51\u9875\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Flask<\/h3>\n<\/p>\n<p><p>Flask\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684Web\u6846\u67b6\uff0c\u9002\u5408\u5feb\u901f\u5f00\u53d1\u548c\u539f\u578b\u8bbe\u8ba1\u3002\u5b83\u6613\u4e8e\u5b66\u4e60\u4e14\u529f\u80fd\u5f3a\u5927\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5Flask<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Flask\u3002\u53ef\u4ee5\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install Flask<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Flask\u5e94\u7528<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u4f8b\u5982<code>app.py<\/code>\uff0c\u5e76\u5199\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/&#39;)<\/p>\n<p>def home():<\/p>\n<p>    return &#39;&lt;h1&gt;Hello, World!&lt;\/h1&gt;&#39;<\/p>\n<p>if __name__ == &#39;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2aFlask\u5e94\u7528\uff0c\u5e76\u5b9a\u4e49\u4e86\u4e00\u4e2a\u8def\u7531<code>\/<\/code>\uff0c\u5f53\u8bbf\u95ee\u8be5\u8def\u7531\u65f6\uff0c\u6d4f\u89c8\u5668\u4f1a\u663e\u793a\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><h4>3. \u8fd0\u884cFlask\u5e94\u7528<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8Flask\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python app.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u5e76\u8bbf\u95ee<code>http:\/\/127.0.0.1:5000\/<\/code>\uff0c\u4f60\u5c06\u770b\u5230\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Django<\/h3>\n<\/p>\n<p><p>Django\u662f\u4e00\u4e2a\u529f\u80fd\u9f50\u5168\u7684Web\u6846\u67b6\uff0c\u9002\u7528\u4e8e\u6784\u5efa\u590d\u6742\u4e14\u5927\u578b\u7684Web\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5Django<\/h4>\n<\/p>\n<p><p>\u540c\u6837\u5730\uff0c\u4f60\u9700\u8981\u901a\u8fc7pip\u6765\u5b89\u88c5Django\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install Django<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efaDjango\u9879\u76ee<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Django\u9879\u76ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">django-admin startproject myproject<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd myproject<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u521b\u5efaDjango\u5e94\u7528<\/h4>\n<\/p>\n<p><p>\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Django\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python manage.py startapp myapp<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. \u5b9a\u4e49\u89c6\u56fe\u548c\u8def\u7531<\/h4>\n<\/p>\n<p><p>\u5728<code>myapp<\/code>\u76ee\u5f55\u4e2d\u7684<code>views.py<\/code>\u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u89c6\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django.http import HttpResponse<\/p>\n<p>def home(request):<\/p>\n<p>    return HttpResponse(&#39;&lt;h1&gt;Hello, World!&lt;\/h1&gt;&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u5728<code>myproject<\/code>\u76ee\u5f55\u4e2d\u7684<code>urls.py<\/code>\u6587\u4ef6\u4e2d\u6dfb\u52a0\u8def\u7531\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django.contrib import admin<\/p>\n<p>from django.urls import path<\/p>\n<p>from myapp.views import home<\/p>\n<p>urlpatterns = [<\/p>\n<p>    path(&#39;admin\/&#39;, admin.site.urls),<\/p>\n<p>    path(&#39;&#39;, home),<\/p>\n<p>]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5. \u8fd0\u884cDjango\u5f00\u53d1\u670d\u52a1\u5668<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8Django\u5f00\u53d1\u670d\u52a1\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python manage.py runserver<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u5e76\u8bbf\u95ee<code>http:\/\/127.0.0.1:8000\/<\/code>\uff0c\u4f60\u5c06\u770b\u5230\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u751f\u6210\u9759\u6001HTML\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u4e0d\u9700\u8981\u52a8\u6001\u751f\u6210\u5185\u5bb9\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Python\u751f\u6210\u9759\u6001HTML\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>1. \u521b\u5efaHTML\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u4f8b\u5982<code>generate_html.py<\/code>\uff0c\u5e76\u5199\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">html_content = &#39;&#39;&#39;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;title&gt;My Web Page&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;h1&gt;Hello, World!&lt;\/h1&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>&#39;&#39;&#39;<\/p>\n<p>with open(&#39;index.html&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(html_content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8fd0\u884cPython\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u751f\u6210HTML\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python generate_html.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>index.html<\/code>\u7684\u6587\u4ef6\uff0c\u5305\u542b\u7b80\u5355\u7684HTML\u5185\u5bb9\u3002\u4f60\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u770b\u5230\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u90e8\u7f72\u7f51\u9875<\/h3>\n<\/p>\n<p><p>\u5728\u5b8c\u6210\u7f51\u9875\u5f00\u53d1\u540e\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5c06\u7f51\u9875\u90e8\u7f72\u5230\u751f\u4ea7\u73af\u5883\u4e2d\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u90e8\u7f72\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528WSGI\u670d\u52a1\u5668<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8eFlask\u548cDjango\u5e94\u7528\uff0c\u53ef\u4ee5\u4f7f\u7528WSGI\u670d\u52a1\u5668\uff08\u4f8b\u5982Gunicorn\u6216uWSGI\uff09\u6765\u90e8\u7f72\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Gunicorn\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install gunicorn<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884cGunicorn\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">gunicorn app:app<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8eDjango\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">gunicorn myproject.wsgi:application<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528Web\u670d\u52a1\u5668<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528Nginx\u6216Apache\u7b49Web\u670d\u52a1\u5668\u6765\u6258\u7ba1\u9759\u6001HTML\u6587\u4ef6\u6216\u53cd\u5411\u4ee3\u7406WSGI\u670d\u52a1\u5668\u3002<\/p>\n<\/p>\n<p><p>\u914d\u7f6eNginx\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-nginx\">server {<\/p>\n<p>    listen 80;<\/p>\n<p>    server_name yourdomain.com;<\/p>\n<p>    location \/ {<\/p>\n<p>        proxy_pass http:\/\/127.0.0.1:8000;<\/p>\n<p>        proxy_set_header Host $host;<\/p>\n<p>        proxy_set_header X-Real-IP $remote_addr;<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u4f7f\u7528PaaS\u5e73\u53f0<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528Heroku\u3001AWS Elastic Beanstalk\u3001Google App Engine\u7b49\u5e73\u53f0\u5373\u670d\u52a1\uff08PaaS\uff09\u5e73\u53f0\u6765\u90e8\u7f72\u4f60\u7684\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528Heroku\u90e8\u7f72Flask\u5e94\u7528\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">heroku create<\/p>\n<p>git push heroku master<\/p>\n<p>heroku ps:scale web=1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ecb\u7ecd\uff0c\u4f60\u5df2\u7ecf\u4e86\u89e3\u4e86\u5982\u4f55\u4f7f\u7528Python\u521b\u5efa\u4e00\u4e2a\u7f51\u9875\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u4ee5\u53ca\u751f\u6210\u9759\u6001HTML\u6587\u4ef6\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\uff0c\u5177\u4f53\u9009\u62e9\u53d6\u51b3\u4e8e\u4f60\u7684\u9879\u76ee\u9700\u6c42\u548c\u590d\u6742\u5ea6\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Flask<\/strong>\u9002\u5408\u5feb\u901f\u5f00\u53d1\u548c\u539f\u578b\u8bbe\u8ba1\uff0c<strong>\u4f7f\u7528Django<\/strong>\u9002\u5408\u6784\u5efa\u590d\u6742\u4e14\u5927\u578b\u7684Web\u5e94\u7528\uff0c<strong>\u751f\u6210\u9759\u6001HTML\u6587\u4ef6<\/strong>\u9002\u5408\u7b80\u5355\u7684\u9759\u6001\u9875\u9762\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u5e76\u7ed3\u5408\u4f7f\u7528WSGI\u670d\u52a1\u5668\u548cWeb\u670d\u52a1\u5668\u6765\u90e8\u7f72\u4f60\u7684\u5e94\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u7f51\u9875\uff1f<\/strong><br \/>\u521b\u5efa\u7f51\u9875\u7684\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Python\u7684Flask\u6216Django\u6846\u67b6\u6765\u5b9e\u73b0\u3002Flask\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u6846\u67b6\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\uff1b\u800cDjango\u5219\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u529f\u80fd\uff0c\u9002\u5408\u6784\u5efa\u590d\u6742\u7684\u5e94\u7528\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Flask\u521b\u5efa\u7b80\u5355\u7f51\u9875\u7684\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u5b89\u88c5Flask\u5e93\uff1a\u901a\u8fc7\u547d\u4ee4<code>pip install Flask<\/code>\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u5bfc\u5165Flask\u5e76\u8bbe\u7f6e\u57fa\u672c\u8def\u7531\u3002<\/li>\n<li>\u4f7f\u7528<code>render_template<\/code>\u51fd\u6570\u6765\u6e32\u67d3HTML\u9875\u9762\u3002<\/li>\n<li>\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u5e76\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u6307\u5b9a\u7684\u5730\u5740\u3002<\/li>\n<\/ol>\n<p><strong>Python\u7f51\u9875\u5f00\u53d1\u9700\u8981\u638c\u63e1\u54ea\u4e9b\u57fa\u672c\u77e5\u8bc6\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u8fdb\u884c\u7f51\u9875\u5f00\u53d1\u65f6\uff0c\u638c\u63e1\u4ee5\u4e0b\u77e5\u8bc6\u5c06\u975e\u5e38\u6709\u5e2e\u52a9\uff1a<\/p>\n<ul>\n<li>HTML\u3001CSS\u548cJavaScript\u7684\u57fa\u672c\u8bed\u6cd5\uff0c\u4ee5\u4fbf\u80fd\u591f\u8bbe\u8ba1\u7f8e\u89c2\u7684\u7528\u6237\u754c\u9762\u3002<\/li>\n<li>Python\u7684\u57fa\u672c\u7f16\u7a0b\u77e5\u8bc6\uff0c\u5c24\u5176\u662f\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u3002<\/li>\n<li>\u719f\u6089Flask\u6216Django\u6846\u67b6\u7684\u57fa\u672c\u7528\u6cd5\uff0c\u5305\u62ec\u8def\u7531\u3001\u89c6\u56fe\u51fd\u6570\u548c\u6a21\u677f\u6e32\u67d3\u3002<\/li>\n<li>\u6570\u636e\u5e93\u7684\u57fa\u672c\u64cd\u4f5c\uff0c\u4e86\u89e3\u5982\u4f55\u4f7f\u7528SQLite\u6216PostgreSQL\u7b49\u6570\u636e\u5e93\u4e0ePython\u8fdb\u884c\u4ea4\u4e92\u3002<\/li>\n<\/ul>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5904\u7406\u7f51\u9875\u8868\u5355\u6570\u636e\uff1f<\/strong><br \/>\u5904\u7406\u7f51\u9875\u8868\u5355\u6570\u636e\u901a\u5e38\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u5728HTML\u6587\u4ef6\u4e2d\u521b\u5efa\u8868\u5355\uff0c\u786e\u4fdd\u8bbe\u7f6e\u5408\u9002\u7684<code>action<\/code>\u548c<code>method<\/code>\u5c5e\u6027\u3002<\/li>\n<li>\u5728Flask\u6216Django\u4e2d\u5b9a\u4e49\u5904\u7406\u8868\u5355\u6570\u636e\u7684\u89c6\u56fe\u51fd\u6570\u3002<\/li>\n<li>\u4f7f\u7528<code>request<\/code>\u5bf9\u8c61\u83b7\u53d6\u8868\u5355\u6570\u636e\uff0c\u4f8b\u5982<code>request.form[&#39;field_name&#39;]<\/code>\u3002<\/li>\n<li>\u6839\u636e\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u9a8c\u8bc1\u548c\u5904\u7406\uff0c\u6700\u540e\u8fd4\u56de\u76f8\u5e94\u7684\u54cd\u5e94\u6216\u6e32\u67d3\u65b0\u7684\u9875\u9762\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"Python \u5982\u4f55\u5199\u4e00\u4e2a\u7f51\u9875\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u7b49Web\u6846\u67b6\uff0c\u6216\u8005\u76f4\u63a5\u751f [&hellip;]","protected":false},"author":3,"featured_media":1098578,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098570"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1098570"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098570\/revisions"}],"predecessor-version":[{"id":1098583,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098570\/revisions\/1098583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1098578"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1098570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1098570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1098570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}