{"id":33337,"date":"2025-04-27T11:22:44","date_gmt":"2025-04-27T03:22:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/33337.html"},"modified":"2025-04-27T11:22:44","modified_gmt":"2025-04-27T03:22:44","slug":"%e5%9f%ba%e4%ba%8edjango%e7%9a%84%e4%b8%aa%e6%80%a7%e5%8c%96%e8%82%a1%e7%a5%a8%e4%ba%a4%e6%98%93%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/33337.html","title":{"rendered":"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf"},"content":{"rendered":"<p>\u672c\u9879\u76ee\u57fa\u4e8ePython3.6\u3001Django2.1\u3001MySql8.0&#xff08;\u6700\u597d\u4e0d\u8981\u4f7f\u75285.6&#xff0c;\u5b57\u7b26\u96c6\u7b49\u65b9\u9762\u5747\u4e0d\u517c\u5bb9&#xff0c;\u5426\u5219\u5bfc\u5165\u6570\u636e\u5e93\u4f1a\u51fa\u9519&#xff09;\u4e0e\u80a1\u7968\u4fe1\u606f\u5de5\u5177\u5305TuShare\u5b9e\u73b0\u3002<\/p>\n<p>\u521b\u5efa\u6216\u6fc0\u6d3b\u5bf9\u5e94Python\u5f00\u53d1\u73af\u5883 \u8fd9\u91cc\u4f7f\u7528\u4e86conda\u6765\u7ba1\u7406\u73af\u5883&#xff0c;\u5f3a\u70c8\u63a8\u8350&#xff0c;\u907f\u514d\u4e0d\u540c\u73af\u5883\u5305\u5e72\u6270\u3001\u4f9d\u8d56\u7684\u95ee\u9898\u3002<\/p>\n<p>$ conda activate Webdev (Webdev)$<\/p>\n<h2>\u6216\u8005<\/h2>\n<p>$ conda create -n Webdev python&#061;3.6 $ conda activate Webdev (Webdev)$ \u5b89\u88c5\u6240\u9700\u8981\u7684\u4f9d\u8d56\u5305 pip install -r requirements.txt \u672c\u9879\u76ee\u4f9d\u8d56\u7684\u6838\u5fc3\u5305\u6709&#xff1a;Django 2.1.15\u4e0etushare pro&#xff0c;\u524d\u8005\u4f5c\u4e3a\u4e3b\u8981\u5f00\u53d1\u6846\u67b6&#xff0c;\u540e\u8005\u662f\u722c\u53d6\u80a1\u7968\u6570\u636e\u7684\u6838\u5fc3\u5305\u3002tushare\u9700\u8981\u4f9d\u8d56pandas\u7b49\u5305&#xff0c;\u7528\u4e8e\u6570\u636e\u5206\u6790\u548c\u5904\u7406\u3002 my-fake-useragent\u7528\u4e8e\u751f\u6210\u4f2a\u8bf7\u6c42\u5934&#xff0c;\u722c\u53d6\u76f8\u5e94\u7684\u65b0\u95fb\u6570\u636e\u3002 django-mptt\u7528\u4e8e\u751f\u6210\u6811\u5f62\u591a\u7ea7\u8bc4\u8bba\u3002<\/p>\n<p>\u521b\u5efa\u5bf9\u5e94\u6570\u636e\u5e93&#xff08;stocktrading&#xff09;\u548c\u7528\u6237&#xff08;trading&#xff09; create database stocktrading; create user \u2018trading\u2019&#064;\u2018localhost\u2019 identified by trading; grant all privileges on stocktrading to \u2018trading\u2019&#064;\u2018localhost\u2019; flush privileges; \u6267\u884c\u8fc1\u79fb\u547d\u4ee4&#xff0c;\u521b\u5efa\u6a21\u578b\u6570\u636e\u8868\u6620\u5c04 \u6539\u547d\u4ee4\u4f1a\u6839\u636emodels.py\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u6a21\u578b\u521b\u5efa\u6570\u636e\u8868\u7ed3\u6784&#xff08;\u65e0\u6570\u636e&#xff09;\u3002<\/p>\n<p>$ python manage.py makemigrations $ python manage.py migrate \u5c06config\/\u4e0b\u7684sql\u6587\u4ef6\u5bfc\u5165\u6570\u636e\u5e93\u4e2d \u5728mysql\u73af\u5883\u4e2d\u6267\u884c&#xff0c;\u4f1a\u5c06stocktrading.sql\u4e2d\u5b9a\u4e49\u7684\u8868\u7ed3\u6784\u548c\u6570\u636e\u5168\u90e8\u5bfc\u5165\u3002<\/p>\n<p>use stocktrading; source stocktrading.sql; \u5f00\u59cb\u8fd0\u884c\u548c\u6d4b\u8bd5 python manage.py runserver \u6253\u5f00localhost:8000\u7aef\u53e3\u5373\u53ef\u67e5\u770b\u5e94\u7528\u3002<\/p>\n<p>\u8fd0\u884c\u60c5\u51b5 \u767b\u5f55\u754c\u9762 login \u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032235-680da2fb0c8c0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u53ef\u4ee5\u70b9\u51fb\u4e0a\u65b9\u6ce8\u518c\u6309\u94ae\u6ce8\u518c\u3002<\/p>\n<p>\u6ce8\u518c\u9875\u9762 register <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032236-680da2fc6b9eb.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8f93\u5165\u76f8\u5e94\u4fe1\u606f\u5373\u53ef\u5b8c\u6210\u6ce8\u518c\u3002 \u4f46\u662f\u8003\u8651\u5230\u5df2\u7ecf\u5bfc\u5165\u6570\u636e\u5e93sql\u6587\u4ef6&#xff0c;\u90a3\u4e48\u6570\u636e\u5e93\u4e2d\u5e94\u8be5\u6709\u4e86\u76f8\u5f53\u6570\u91cf\u53ef\u4ee5\u76f4\u63a5\u767b\u5f55\u7684\u7528\u6237\u3002\u53ef\u4ee5\u4efb\u53d6\u4e00\u4e2a\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<p>username: 10071539640 password: 65815609<\/p>\n<p>\u7528\u6237\u9996\u9875 index1index2 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032236-680da2fce3093.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032237-680da2fd4de0f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u9996\u9875\u53ef\u4ee5\u5206\u4e3a4\u4e2a\u6a21\u5757&#xff0c;\u4f20\u9012\u7684\u4fe1\u606f\u4e5f\u662f\u6bd4\u8f83\u7684\u4e30\u5bcc\u3002\u5206\u522b\u662f&#xff1a;<\/p>\n<p>\u70ed\u95e8\u725b\u80a1&#xff1a;\u6839\u636e\u6bcf\u5929\u7684\u80a1\u7968\u6536\u76d8\u4ef7\u683c\u548c\u6b21\u65e5\u7684\u5f00\u76d8\u4ef7\u683c\u8ba1\u7b97\u5dee\u503c\u548c\u6da8\u5e45&#xff0c;\u6309\u7167\u6da8\u5e45\u8fdb\u884c\u6392\u5e8f\u5f97\u5230\u7684\u524d10\u53ea\u70ed\u95e8\u725b\u80a1&#xff1b; \u91cd\u5927\u65b0\u95fb&#xff1a;\u7ba1\u7406\u5458\u81ea\u5df1\u53d1\u5e03\u6216\u8005\u901a\u8fc7\u722c\u866b\u83b7\u53d6\u5230\u4e1c\u65b9\u8d22\u5bcc\u7f51\u4e0a\u520a\u767b\u7684\u91cd\u5927\u65b0\u95fb\u7b80\u8981\u4fe1\u606f&#xff0c;\u7b5b\u9009\u540e\u63a8\u8350\u7ed9\u7528\u6237\u3002\u53ef\u4ee5\u70b9\u51fb\u6362\u4e00\u6ce2\u7785\u7785\u67e5\u770b\u66f4\u591a\u5176\u4ed6\u611f\u5174\u8da3\u7684\u65b0\u95fb\u8d44\u8baf\u3002\u6709\u53ef\u4ee5\u70b9\u51fb\u65b0\u95fb\u6807\u9898\u8fdb\u5165\u65b0\u95fb\u8be6\u60c5\u3002 \u770b\u5927\u76d8\u6a21\u5757&#xff1a;\u5c55\u793a\u4e86\u901a\u8fc7tushare\u6a21\u5757\u6293\u53d6\u7684\u4e0a\u8bc1\u6307\u6570\u53d8\u5316\u60c5\u51b5\u3002 \u6211\u7684\u8bc4\u8bba\u6a21\u5757&#xff1a;\u5c55\u793a\u4e86\u6211&#xff08;\u8be5\u767b\u5f55\u7528\u6237&#xff09;\u8fd1\u671f\u6240\u53d1\u5e03\u7684\u5bf9\u80a1\u7968\u7684\u8bc4\u8bba\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u70b9\u51fb\u8bc4\u8bba\u6807\u9898\u8fdb\u5165\u8bc4\u8bba\u8be6\u60c5\u3002 \u5de6\u4fa7\u7684\u63a7\u5236\u83dc\u5355\u9762\u677f&#xff0c;\u53ef\u901a\u8fc7\u8be5\u9762\u677f\u8fdb\u5165\u5176\u4ed6\u6a21\u5757\u8fdb\u884c\u7ba1\u7406\u3002 \u4e2a\u4eba\u4fe1\u606f\u7ba1\u7406 myprofile <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032237-680da2fdb37ee.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u5de6\u4fa7\u7528\u6237\u4fe1\u606f\u6216\u8005\u4e0a\u65b9\u5bfc\u822a\u680f\u7684\u5934\u50cf&#xff0c;\u53ef\u4ee5\u8fdb\u5165\u7528\u6237\u4fe1\u606f\u754c\u9762&#xff0c;\u5728\u6b64\u67e5\u770b\u4e2a\u4eba\u4fe1\u606f&#xff0c;\u5e76\u53ef\u4ee5\u8fdb\u884c\u4fee\u6539\u3002\u82e5\u4fee\u6539\u9700\u8981\u8f93\u5165\u5bc6\u7801\u5e76\u786e\u8ba4\u5bc6\u7801\u3002<\/p>\n<p>\u70b9\u51fb\u4fee\u6539\u5934\u50cf\u53ef\u4ee5\u4fee\u6539\u5934\u50cf\u3002<\/p>\n<p>change_avatar <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032238-680da2fe278d7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u67e5\u770b\u80a1\u7968\u5217\u8868 stock_list <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032238-680da2fe922fe.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u5de6\u4fa7\u80a1\u7968\u5217\u8868\u5373\u53ef\u67e5\u770b\u80a1\u7968\u5217\u8868&#xff0c;\u91c7\u7528\u4e86DataTable\u7ec4\u4ef6\u8fdb\u884c\u5217\u8868\u5c55\u793a\u3002\u5176\u4e2d\u7ea2\u8272\u8868\u793a\u80a1\u4ef7\u4e0a\u6da8\u7684\u80a1\u7968&#xff0c; \u7eff\u8272\u8868\u793a\u4e0b\u8dcc\u7684\u80a1\u7968\u3002\u7528\u6237\u53ef\u4ee5\u70b9\u51fb\u8be6\u60c5\u9875\u9762\u8fdb\u884c\u67e5\u770b\u80a1\u7968\u8be6\u60c5\u3002<\/p>\n<p>\u80a1\u7968\u8be6\u60c5 stock_detailstock_detail2 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032239-680da2ff0241f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032239-680da2ff5c1f2.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7528\u6237\u5728\u6b64\u9875\u9762\u53ef\u4ee5\u8fdb\u884c\u4e70\u5165\u64cd\u4f5c&#xff0c;\u4e5f\u53ef\u4ee5\u67e5\u770b\u8fd4\u56de\u5230\u4e0a\u7ea7\u9875\u9762\u67e5\u770b\u80a1\u7968\u5217\u8868\u3002 \u5de6\u4e0a\u65b9\u56fe\u8868\u663e\u793a\u4e86\u8fd9\u652f\u80a1\u7968\u7684\u80a1\u4ef7\u53d8\u5316\u65e5K\u7ebf\u56fe\u4e0e\u5b9e\u65f6\u80a1\u4ef7&#xff0c;\u53f3\u4fa7\u662f\u8be5\u80a1\u7968\u7684\u80a1\u6743\u5360\u6bd4&#xff0c;\u5747\u662f\u901a\u8fc7tushare \u63d0\u4f9b\u63a5\u53e3\u8fdb\u884c\u6293\u53d6\u83b7\u5f97\u7684\u3002<\/p>\n<p>\u4e0b\u65b9\u662f\u5173\u4e8e\u80a1\u7968\u7684\u8bc4\u8bba\u4fe1\u606f&#xff0c;\u540c\u65f6\u7528\u6237\u53ef\u4ee5\u53d1\u8868\u81ea\u5df1\u5173\u4e8e\u8fd9\u652f\u80a1\u7968\u7684\u8bc4\u8bba\u4fe1\u606f\u3002<\/p>\n<p>\u7ba1\u7406\u6211\u7684\u80a1\u7968 mystock_list <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032239-680da2ffc0965.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u7ba1\u7406\u6211\u7684\u80a1\u7968&#xff0c;\u5373\u53ef\u67e5\u770b\u5df2\u7ecf\u8d2d\u5165\u7684\u80a1\u7968\u5217\u8868\u3002 \u70b9\u51fb\u8be6\u60c5\u9875\u9762&#xff0c;\u8fdb\u5165\u629b\u552e\u80a1\u7968\u9875\u9762\u3002<\/p>\n<p>out_stock <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032240-680da300127e2.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7ba1\u7406\u6211\u7684\u8bc4\u8bba mycomment <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032240-680da3007e566.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u7ba1\u7406\u6211\u7684\u8bc4\u8bba&#xff0c;\u5373\u53ef\u67e5\u770b\u6211\u5df2\u7ecf\u53d1\u8868\u8fc7\u7684\u8bc4\u8bba\u4fe1\u606f\u3002<\/p>\n<p>\u8be6\u60c5\u9875\u9762\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u5bf9\u8bc4\u8bba\u7684\u56de\u590d\u4fe1\u606f&#xff0c;\u540c\u65f6\u81ea\u5df1\u4e5f\u53ef\u4ee5\u56de\u590d\u81ea\u5df1\u7684\u8bc4\u8bba\u3002<\/p>\n<p>mycomment_detail\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032240-680da300eab7f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u56de\u590d\u8bc4\u8bba\u7684\u7528\u6237\u540d&#xff0c;\u53ef\u4ee5\u67e5\u770b\u8be5\u7528\u6237\u7684\u8be6\u7ec6\u4fe1\u606f&#xff0c;\u4e5f\u53ef\u4ee5\u4e3a\u4ed6(\u5979)\u70b9\u8d5e\u3002<\/p>\n<p>other_profile<\/p>\n<p>\u540c\u65f6\u7528\u6237\u53ef\u4ee5\u5728\u6211\u7684\u8bc4\u8bba\u5217\u8868\u5c06\u8bc4\u8bba\u5220\u9664\u3002<\/p>\n<p>\u67e5\u770b\u65b0\u95fb\u8be6\u60c5 view_news <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032241-680da30150c9b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u65b0\u95fb\u6807\u9898&#xff0c;\u53ef\u4ee5\u8fdb\u5165\u65b0\u95fb\u7684\u8be6\u60c5\u9875\u9762\u3002\u53ef\u4ee5\u5728\u8fd9\u4e2a\u9875\u9762\u70b9\u51fb\u67e5\u770b\u4e0a\u4e00\u6761\u6216\u8005\u4e0b\u4e00\u6761\u65b0\u95fb\u3002<\/p>\n<p>\u7ba1\u7406\u5458\u9996\u9875 \u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u521b\u5efa\u7ba1\u7406\u5458&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032241-680da3019bea4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>python manage.py createsuperuser \u63d0\u793a\u8f93\u5165\u7528\u6237\u540d&#xff0c;\u90ae\u7bb1\u4e0e\u5bc6\u7801&#xff0c; \u8fd9\u91cc\u4f9d\u6b21\u8f93\u5165superuser1&#xff0c;\u7a7a&#xff0c;superuser1\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032242-680da3020bd78.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u4ee5\u8d85\u7ea7\u7ba1\u7406\u5458\u8eab\u4efd\u767b\u5f55\u540e\u53f0\u4e86\u3002<\/p>\n<p>super_index1super_index<\/p>\n<p>\u7ba1\u7406\u5458\u754c\u9762\u4e0e\u7528\u6237\u754c\u9762\u5927\u540c\u5c0f\u5f02&#xff0c;\u53ea\u662f\u5185\u5bb9\u66f4\u52a0\u4e30\u5bcc\u4e86\u4e00\u4e9b\u3002<\/p>\n<p>\u7528\u6237\u4fe1\u606f\u7ba1\u7406 \u70b9\u51fb\u5de6\u4fa7\u7528\u6237\u4fe1\u606f\u7ba1\u7406\u8fdb\u5165\u7528\u6237\u4fe1\u606f\u7ba1\u7406\u8be6\u60c5\u9875\u9762\u3002\u53ef\u4ee5\u770b\u5230\u5168\u90e8\u7528\u6237\u5217\u8868\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032242-680da3026939b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>adm_user<\/p>\n<p>\u70b9\u51fb\u8be6\u60c5\u8fdb\u5165\u7528\u6237\u4fe1\u606f\u8be6\u60c5\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032242-680da302c91ff.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>adm_user_detail<\/p>\n<p>\u5728\u6b64\u754c\u9762&#xff0c;\u7ba1\u7406\u5458\u53ef\u4ee5\u4fee\u6539\u90e8\u5206\u7528\u6237\u7684\u4fe1\u606f&#xff0c;\u4e0d\u5305\u62ec\u5bc6\u7801\u3002\u7ba1\u7406\u5458\u53ef\u4ee5\u51bb\u7ed3\u7528\u6237\u7684\u8d26\u53f7&#xff0c;\u4f7f\u5176 \u65e0\u6cd5\u53c2\u4e0e\u80a1\u7968\u4ea4\u6613&#xff0c;\u7ba1\u7406\u5458\u4e5f\u53ef\u4ee5\u5220\u9664\u7528\u6237\u3002<\/p>\n<p>\u7ba1\u7406\u80a1\u7968\u5217\u8868 adm_stock_list <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032243-680da3033c1f2.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032243-680da303985c4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>adm_stock_detail<\/p>\n<p>\u7ba1\u7406\u4ea4\u6613\u8bb0\u5f55 adm_trading_list <img decoding=\"async\" src=\"2025-04-270hm5dn1uelx.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u80a1\u7968\u4fe1\u606f\u7ef4\u62a4 upholdupdate <img decoding=\"async\" src=\"2025-04-27xxfrlecf1xj.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5728\u6b64\u754c\u9762&#xff0c;\u7ba1\u7406\u5458\u53ef\u4ee5\u70b9\u51fb\u9762\u677f\u4e0a\u7684\u6309\u94ae&#xff0c;\u8fdb\u884c\u6bcf\u5929\u80a1\u7968\u4fe1\u606f\u7684\u7ef4\u62a4\u64cd\u4f5c\u3002 <img decoding=\"async\" src=\"2025-04-27kquq4piuqrg.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u70b9\u51fb\u66f4\u65b0\u5b9e\u65f6\u6570\u636e\u6309\u94ae\u540e&#xff0c;\u53ef\u4ee5\u5728\u63a7\u5236\u53f0\u770b\u5230\u6570\u636e\u5e93\u66f4\u65b0\u7684\u6253\u5370\u4fe1\u606f\u3002<\/p>\n<p>\u65b0\u95fb\u7ba1\u7406 adm_news <img decoding=\"async\" src=\"2025-04-272lwtq4rxl0s.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5728\u65b0\u95fb\u7ba1\u7406\u9875\u9762&#xff0c;\u7ba1\u7406\u5458\u53ef\u4ee5\u6dfb\u52a0\u65b0\u95fb\u4fe1\u606f&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528\u722c\u866b\u5de5\u5177\u81ea\u52a8\u83b7\u53d6\u4e00\u4e9b\u65b0\u95fb\u4fe1\u606f&#xff0c;\u5f53\u7136\u4e5f\u53ef\u4ee5\u8fdb\u5165\u65b0\u95fb \u9875\u9762\u7684\u8be6\u60c5&#xff0c;\u5bf9\u65b0\u95fb\u7684\u4fe1\u606f\u8fdb\u884c\u7f16\u8f91\u6216\u5220\u9664\u3002<\/p>\n<p>\u8bc4\u8bba\u7ba1\u7406 adm_comment <img decoding=\"async\" src=\"2025-04-27dvargersn2r.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb790\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u9879\u76ee\u57fa\u4e8ePython3.6\u3001Django2.1\u3001MySql8.0\uff08\u6700\u597d\u4e0d\u8981\u4f7f\u75285.6\uff0c\u5b57\u7b26\u96c6\u7b49\u65b9\u9762\u5747\u4e0d\u517c\u5bb9\uff0c\u5426\u5219\u5bfc\u5165\u6570\u636e\u5e93\u4f1a\u51fa\u9519\uff09\u4e0e\u80a1\u7968\u4fe1\u606f\u5de5\u5177\u5305TuShare\u5b9e\u73b0\u3002\u521b\u5efa\u6216\u6fc0\u6d3b\u5bf9\u5e94Python\u5f00\u53d1\u73af\u5883\u8fd9\u91cc\u4f7f\u7528\u4e86conda\u6765\u7ba1\u7406\u73af\u5883\uff0c\u5f3a\u70c8\u63a8\u8350\uff0c\u907f\u514d\u4e0d\u540c\u73af\u5883\u5305\u5e72\u6270\u3001\u4f9d\u8d56\u7684\u95ee\u9898\u3002(Webdev)$<\/p>\n","protected":false},"author":2,"featured_media":33317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[890,81,292],"topic":[],"class_list":["post-33337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-django","tag-python","tag-292"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/33337.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb790\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u9879\u76ee\u57fa\u4e8ePython3.6\u3001Django2.1\u3001MySql8.0\uff08\u6700\u597d\u4e0d\u8981\u4f7f\u75285.6\uff0c\u5b57\u7b26\u96c6\u7b49\u65b9\u9762\u5747\u4e0d\u517c\u5bb9\uff0c\u5426\u5219\u5bfc\u5165\u6570\u636e\u5e93\u4f1a\u51fa\u9519\uff09\u4e0e\u80a1\u7968\u4fe1\u606f\u5de5\u5177\u5305TuShare\u5b9e\u73b0\u3002\u521b\u5efa\u6216\u6fc0\u6d3b\u5bf9\u5e94Python\u5f00\u53d1\u73af\u5883\u8fd9\u91cc\u4f7f\u7528\u4e86conda\u6765\u7ba1\u7406\u73af\u5883\uff0c\u5f3a\u70c8\u63a8\u8350\uff0c\u907f\u514d\u4e0d\u540c\u73af\u5883\u5305\u5e72\u6270\u3001\u4f9d\u8d56\u7684\u95ee\u9898\u3002(Webdev)$\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/33337.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-27T03:22:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032235-680da2fb0c8c0.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33337.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/33337.html\",\"name\":\"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-27T03:22:44+00:00\",\"dateModified\":\"2025-04-27T03:22:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/33337.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/33337.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33337.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/33337.html","og_locale":"zh_CN","og_type":"article","og_title":"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb790\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u9879\u76ee\u57fa\u4e8ePython3.6\u3001Django2.1\u3001MySql8.0\uff08\u6700\u597d\u4e0d\u8981\u4f7f\u75285.6\uff0c\u5b57\u7b26\u96c6\u7b49\u65b9\u9762\u5747\u4e0d\u517c\u5bb9\uff0c\u5426\u5219\u5bfc\u5165\u6570\u636e\u5e93\u4f1a\u51fa\u9519\uff09\u4e0e\u80a1\u7968\u4fe1\u606f\u5de5\u5177\u5305TuShare\u5b9e\u73b0\u3002\u521b\u5efa\u6216\u6fc0\u6d3b\u5bf9\u5e94Python\u5f00\u53d1\u73af\u5883\u8fd9\u91cc\u4f7f\u7528\u4e86conda\u6765\u7ba1\u7406\u73af\u5883\uff0c\u5f3a\u70c8\u63a8\u8350\uff0c\u907f\u514d\u4e0d\u540c\u73af\u5883\u5305\u5e72\u6270\u3001\u4f9d\u8d56\u7684\u95ee\u9898\u3002(Webdev)$","og_url":"https:\/\/www.wsisp.com\/helps\/33337.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-27T03:22:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250427032235-680da2fb0c8c0.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/33337.html","url":"https:\/\/www.wsisp.com\/helps\/33337.html","name":"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-27T03:22:44+00:00","dateModified":"2025-04-27T03:22:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/33337.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/33337.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/33337.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8eDjango\u7684\u4e2a\u6027\u5316\u80a1\u7968\u4ea4\u6613\u7ba1\u7406\u7cfb\u7edf"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=33337"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33337\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/33317"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=33337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=33337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=33337"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=33337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}