{"id":990206,"date":"2024-12-27T08:18:13","date_gmt":"2024-12-27T00:18:13","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/990206.html"},"modified":"2024-12-27T08:18:16","modified_gmt":"2024-12-27T00:18:16","slug":"python%e4%b8%ad%e8%a1%a8%e5%8d%95%e5%a6%82%e4%bd%95%e5%88%b6%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/990206.html","title":{"rendered":"python\u4e2d\u8868\u5355\u5982\u4f55\u5236\u4f5c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25065036\/1b9d57b4-51ef-47db-956c-4480646966c0.webp\" alt=\"python\u4e2d\u8868\u5355\u5982\u4f55\u5236\u4f5c\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u5236\u4f5c\u8868\u5355\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c<strong>\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Flask\u6216Django\u6846\u67b6\u6784\u5efaWeb\u8868\u5355\u3001\u4f7f\u7528Tkinter\u521b\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u8868\u5355\u3001\u4ee5\u53ca\u4f7f\u7528PyQt\u6765\u5b9e\u73b0\u8de8\u5e73\u53f0GUI\u8868\u5355<\/strong>\u3002\u5176\u4e2d\uff0cFlask\u548cDjango\u7528\u4e8eWeb\u5e94\u7528\u5f00\u53d1\uff0c\u5b83\u4eec\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u6765\u5904\u7406HTML\u8868\u5355\u8f93\u5165\u548c\u9a8c\u8bc1\uff0c\u800cTkinter\u548cPyQt\u5219\u7528\u4e8e\u521b\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002\u4e0b\u9762\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\u6765\u5236\u4f5cPython\u8868\u5355\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528FLASK\u6846\u67b6\u521b\u5efaWEB\u8868\u5355<\/p>\n<\/p>\n<p><p>Flask\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684Python Web\u6846\u67b6\uff0c\u9002\u5408\u5feb\u901f\u6784\u5efaWeb\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7Flask\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u548c\u5904\u7406HTML\u8868\u5355\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5Flask<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u5b89\u88c5\u4e86Flask\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528pip\u6765\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><h3>2. \u521b\u5efa\u57fa\u672c\u7684Flask\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Flask\u5e94\u7528\u7a0b\u5e8f\uff0c\u5b9a\u4e49\u4e00\u4e2a\u7528\u4e8e\u663e\u793a\u8868\u5355\u7684HTML\u9875\u9762\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, render_template, request<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/&#39;, methods=[&#39;GET&#39;, &#39;POST&#39;])<\/p>\n<p>def form():<\/p>\n<p>    if request.method == &#39;POST&#39;:<\/p>\n<p>        # \u5904\u7406\u8868\u5355\u6570\u636e<\/p>\n<p>        name = request.form.get(&#39;name&#39;)<\/p>\n<p>        em<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>l = request.form.get(&#39;email&#39;)<\/p>\n<p>        return f&quot;Name: {name}, Email: {email}&quot;<\/p>\n<p>    return render_template(&#39;form.html&#39;)<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u521b\u5efaHTML\u8868\u5355\u6a21\u677f<\/h3>\n<\/p>\n<p><p>\u5728templates\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2aform.html\u6587\u4ef6\uff0c\u5b9a\u4e49\u8868\u5355\u7ed3\u6784\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;Form&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;form method=&quot;POST&quot;&gt;<\/p>\n<p>        &lt;label for=&quot;name&quot;&gt;Name:&lt;\/label&gt;<\/p>\n<p>        &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot; required&gt;<\/p>\n<p>        &lt;br&gt;<\/p>\n<p>        &lt;label for=&quot;email&quot;&gt;Email:&lt;\/label&gt;<\/p>\n<p>        &lt;input type=&quot;email&quot; id=&quot;email&quot; name=&quot;email&quot; required&gt;<\/p>\n<p>        &lt;br&gt;<\/p>\n<p>        &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;<\/p>\n<p>    &lt;\/form&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4. \u542f\u52a8Flask\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u8fd0\u884cPython\u811a\u672c\uff0c\u542f\u52a8Flask\u5e94\u7528\uff0c\u7136\u540e\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee<code>http:\/\/127.0.0.1:5000\/<\/code>\uff0c\u586b\u5199\u5e76\u63d0\u4ea4\u8868\u5355\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528DJANGO\u6846\u67b6\u521b\u5efaWEB\u8868\u5355<\/p>\n<\/p>\n<p><p>Django\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684Web\u6846\u67b6\uff0c\u9002\u5408\u6784\u5efa\u590d\u6742\u7684Web\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8868\u5355\u5904\u7406\u548c\u9a8c\u8bc1\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5Django<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528pip\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><h3>2. \u521b\u5efaDjango\u9879\u76ee\u548c\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Django\u547d\u4ee4\u884c\u5de5\u5177\u521b\u5efa\u9879\u76ee\u548c\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">django-admin startproject myproject<\/p>\n<p>cd myproject<\/p>\n<p>django-admin startapp myapp<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u5b9a\u4e49Django\u8868\u5355<\/h3>\n<\/p>\n<p><p>\u5728myapp\/forms.py\u4e2d\u5b9a\u4e49\u4e00\u4e2aDjango\u8868\u5355\u7c7b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django import forms<\/p>\n<p>class ContactForm(forms.Form):<\/p>\n<p>    name = forms.CharField(label=&#39;Name&#39;, max_length=100)<\/p>\n<p>    email = forms.EmailField(label=&#39;Email&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4. \u521b\u5efa\u89c6\u56fe\u5904\u7406\u8868\u5355<\/h3>\n<\/p>\n<p><p>\u5728myapp\/views.py\u4e2d\u521b\u5efa\u4e00\u4e2a\u89c6\u56fe\uff0c\u7528\u4e8e\u5904\u7406\u8868\u5355\u7684\u663e\u793a\u548c\u63d0\u4ea4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django.shortcuts import render<\/p>\n<p>from .forms import ContactForm<\/p>\n<p>def contact_view(request):<\/p>\n<p>    if request.method == &#39;POST&#39;:<\/p>\n<p>        form = ContactForm(request.POST)<\/p>\n<p>        if form.is_valid():<\/p>\n<p>            name = form.cleaned_data[&#39;name&#39;]<\/p>\n<p>            email = form.cleaned_data[&#39;email&#39;]<\/p>\n<p>            return render(request, &#39;submitted.html&#39;, {&#39;name&#39;: name, &#39;email&#39;: email})<\/p>\n<p>    else:<\/p>\n<p>        form = ContactForm()<\/p>\n<p>    return render(request, &#39;form.html&#39;, {&#39;form&#39;: form})<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>5. \u914d\u7f6eURL\u8def\u7531<\/h3>\n<\/p>\n<p><p>\u5728myproject\/urls.py\u4e2d\u6dfb\u52a0\u8def\u7531\u914d\u7f6e\u3002<\/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 contact_view<\/p>\n<p>urlpatterns = [<\/p>\n<p>    path(&#39;admin\/&#39;, admin.site.urls),<\/p>\n<p>    path(&#39;contact\/&#39;, contact_view, name=&#39;contact&#39;),<\/p>\n<p>]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>6. \u521b\u5efa\u6a21\u677f\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728myapp\/templates\u76ee\u5f55\u4e0b\u521b\u5efaform.html\u548csubmitted.html\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-html\">&lt;!-- form.html --&gt;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;Contact Form&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;form method=&quot;POST&quot;&gt;<\/p>\n<p>        {% csrf_token %}<\/p>\n<p>        {{ form.as_p }}<\/p>\n<p>        &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;<\/p>\n<p>    &lt;\/form&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>&lt;!-- submitted.html --&gt;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;Form Submitted&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;p&gt;Thank you, {{ name }}! We have received your email: {{ email }}&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>7. \u542f\u52a8Django\u5f00\u53d1\u670d\u52a1\u5668<\/h3>\n<\/p>\n<p><p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\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\u8bbf\u95ee<code>http:\/\/127.0.0.1:8000\/contact\/<\/code>\u67e5\u770b\u8868\u5355\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528TKINTER\u521b\u5efa\u684c\u9762\u8868\u5355<\/p>\n<\/p>\n<p><p>Tkinter\u662fPython\u7684\u6807\u51c6GUI\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u7b80\u5355\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>1. \u521b\u5efaTkinter\u8868\u5355<\/h3>\n<\/p>\n<p><p>\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u4f7f\u7528Tkinter\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u8868\u5355\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>from tkinter import messagebox<\/p>\n<p>def submit_form():<\/p>\n<p>    name = name_entry.get()<\/p>\n<p>    email = email_entry.get()<\/p>\n<p>    messagebox.showinfo(&quot;Form Submitted&quot;, f&quot;Name: {name}\\nEmail: {email}&quot;)<\/p>\n<p>app = tk.Tk()<\/p>\n<p>app.title(&quot;Form&quot;)<\/p>\n<p>tk.Label(app, text=&quot;Name:&quot;).grid(row=0, column=0)<\/p>\n<p>name_entry = tk.Entry(app)<\/p>\n<p>name_entry.grid(row=0, column=1)<\/p>\n<p>tk.Label(app, text=&quot;Email:&quot;).grid(row=1, column=0)<\/p>\n<p>email_entry = tk.Entry(app)<\/p>\n<p>email_entry.grid(row=1, column=1)<\/p>\n<p>submit_button = tk.Button(app, text=&quot;Submit&quot;, command=submit_form)<\/p>\n<p>submit_button.grid(row=2, column=0, columnspan=2)<\/p>\n<p>app.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528PYQT\u521b\u5efa\u8de8\u5e73\u53f0GUI\u8868\u5355<\/p>\n<\/p>\n<p><p>PyQt\u662fPython\u7ed1\u5b9a\u7684Qt\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u8de8\u5e73\u53f0\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5PyQt<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5PyQt\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install PyQt5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u521b\u5efaPyQt\u8868\u5355<\/h3>\n<\/p>\n<p><p>\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u4f7f\u7528PyQt\u521b\u5efa\u4e00\u4e2a\u8868\u5355\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QMessageBox<\/p>\n<p>import sys<\/p>\n<p>def submit_form():<\/p>\n<p>    name = name_input.text()<\/p>\n<p>    email = email_input.text()<\/p>\n<p>    QMessageBox.information(window, &quot;Form Submitted&quot;, f&quot;Name: {name}\\nEmail: {email}&quot;)<\/p>\n<p>app = QApplication(sys.argv)<\/p>\n<p>window = QWidget()<\/p>\n<p>window.setWindowTitle(&quot;Form&quot;)<\/p>\n<p>layout = QVBoxLayout()<\/p>\n<p>name_label = QLabel(&quot;Name:&quot;)<\/p>\n<p>name_input = QLineEdit()<\/p>\n<p>layout.addWidget(name_label)<\/p>\n<p>layout.addWidget(name_input)<\/p>\n<p>email_label = QLabel(&quot;Email:&quot;)<\/p>\n<p>email_input = QLineEdit()<\/p>\n<p>layout.addWidget(email_label)<\/p>\n<p>layout.addWidget(email_input)<\/p>\n<p>submit_button = QPushButton(&quot;Submit&quot;)<\/p>\n<p>submit_button.clicked.connect(submit_form)<\/p>\n<p>layout.addWidget(submit_button)<\/p>\n<p>window.setLayout(layout)<\/p>\n<p>window.show()<\/p>\n<p>sys.exit(app.exec_())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u662fPython\u4e2d\u5236\u4f5c\u8868\u5355\u7684\u51e0\u79cd\u5e38\u89c1\u65b9\u6cd5\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u7279\u70b9\uff0c\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u4efb\u52a1\u3002\u65e0\u8bba\u662fWeb\u8868\u5355\u8fd8\u662f\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u8868\u5355\uff0cPython\u90fd\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5e93\u548c\u6846\u67b6\u6765\u6ee1\u8db3\u5404\u79cd\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u7b80\u5355\u7684\u8868\u5355\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u521b\u5efa\u7b80\u5355\u7684\u8868\u5355\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Web\u6846\u67b6\uff0c\u5982Flask\u6216Django\u3002\u4f7f\u7528Flask\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528WTForms\u5e93\u6765\u5b9a\u4e49\u548c\u5904\u7406\u8868\u5355\u3002\u9996\u5148\uff0c\u5b89\u88c5Flask\u548cWTForms\u5e93\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u8868\u5355\u7c7b\uff0c\u5b9a\u4e49\u9700\u8981\u7684\u5b57\u6bb5\uff0c\u6700\u540e\u5728\u89c6\u56fe\u51fd\u6570\u4e2d\u5904\u7406\u8868\u5355\u63d0\u4ea4\u7684\u6570\u636e\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9bPython\u5e93\u53ef\u4ee5\u7528\u4e8e\u8868\u5355\u5904\u7406\uff1f<\/strong><br \/>Python\u4e2d\u6709\u591a\u4e2a\u5e93\u53ef\u4ee5\u7528\u4e8e\u8868\u5355\u5904\u7406\u3002\u6700\u5e38\u7528\u7684\u5305\u62ecFlask-WTF\u3001Django Forms\u548cTornado\u3002Flask-WTF\u662fFlask\u7684\u6269\u5c55\uff0c\u63d0\u4f9b\u4e86\u8868\u5355\u5904\u7406\u548c\u9a8c\u8bc1\u529f\u80fd\uff1bDjango\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u8868\u5355\u5904\u7406\u529f\u80fd\uff0c\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u548c\u5904\u7406\u8868\u5355\uff1bTornado\u4e5f\u652f\u6301\u8868\u5355\u5904\u7406\uff0c\u9002\u5408\u5904\u7406\u5f02\u6b65\u8bf7\u6c42\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u8868\u5355\u4e2d\u8fdb\u884c\u6570\u636e\u9a8c\u8bc1\uff1f<\/strong><br \/>\u6570\u636e\u9a8c\u8bc1\u662f\u8868\u5355\u5904\u7406\u4e2d\u7684\u91cd\u8981\u4e00\u73af\u3002\u4f7f\u7528WTForms\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u8868\u5355\u7c7b\u4e2d\u4e3a\u5b57\u6bb5\u6dfb\u52a0\u9a8c\u8bc1\u5668\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>DataRequired()<\/code>\u786e\u4fdd\u5b57\u6bb5\u4e0d\u4e3a\u7a7a\uff0c\u4f7f\u7528<code>Email()<\/code>\u9a8c\u8bc1\u7535\u5b50\u90ae\u4ef6\u683c\u5f0f\u3002Django\u7684\u8868\u5355\u4e5f\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u5b9a\u4e49\u5b57\u6bb5\u9a8c\u8bc1\u89c4\u5219\uff0c\u4ece\u800c\u786e\u4fdd\u8f93\u5165\u6570\u636e\u7684\u6709\u6548\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5236\u4f5c\u8868\u5355\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Flask\u6216Django\u6846\u67b6\u6784\u5efaWeb\u8868\u5355\u3001\u4f7f [&hellip;]","protected":false},"author":3,"featured_media":990212,"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\/990206"}],"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=990206"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/990206\/revisions"}],"predecessor-version":[{"id":990215,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/990206\/revisions\/990215"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/990212"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=990206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=990206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=990206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}