{"id":73066,"date":"2026-02-06T23:42:19","date_gmt":"2026-02-06T15:42:19","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/73066.html"},"modified":"2026-02-06T23:42:19","modified_gmt":"2026-02-06T15:42:19","slug":"django%e5%9f%ba%e4%ba%8e%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e7%9a%84%e6%a0%a1%e5%9b%ad%e9%a3%9f%e5%a0%82%e7%82%b9%e9%a4%90%e8%ae%a2%e9%a4%90%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/73066.html","title":{"rendered":"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf"},"content":{"rendered":"<p><font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"4\">\u6536\u85cf\u5173\u6ce8\u4e0d\u8ff7\u8def&#xff01;&#xff01;<\/font> <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"4\">&#x1f31f;\u6587\u672b\u83b7\u53d6\u6e90\u7801&#043;\u6570\u636e\u5e93&#x1f31f;<\/font> <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"3\">\u611f\u5174\u8da3\u7684\u53ef\u4ee5\u5148\u6536\u85cf\u8d77\u6765&#xff0c;\u8fd8\u6709\u5927\u5bb6\u5728\u6bd5\u8bbe\u9009\u9898&#xff08;\u514d\u8d39\u54a8\u8be2\u6307\u5bfc\u9009\u9898&#xff09;&#xff0c;\u9879\u76ee\u4ee5\u53ca\u8bba\u6587\u7f16\u5199\u7b49\u76f8\u5173\u95ee\u9898\u90fd\u53ef\u4ee5\u7ed9\u6211\u7559\u8a00\u54a8\u8be2&#xff0c;\u5e0c\u671b\u5e2e\u52a9\u66f4\u591a\u7684\u4eba<\/font><\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e00\u3001\u9879\u76ee\u6280\u672f<\/li>\n<li>\u4e8c\u3001\u9879\u76ee\u5185\u5bb9\u548c\u529f\u80fd\u4ecb\u7ecd<\/li>\n<li>\u4e09\u3001\u6838\u5fc3\u4ee3\u7801<\/li>\n<li>\u56db\u3001\u6548\u679c\u56fe<\/li>\n<li>\u4e94 \u3001\u8d44\u6599\u83b7\u53d6<\/li>\n<\/ul>\n<hr \/>\n<h2>\u4e00\u3001\u9879\u76ee\u6280\u672f<\/h2>\n<p>\u5f00\u53d1\u8bed\u8a00&#xff1a;Python python\u6846\u67b6&#xff1a;Django \u8f6f\u4ef6\u7248\u672c&#xff1a;python3.7\/python3.8 \u6570\u636e\u5e93&#xff1a;mysql 5.7\u6216\u66f4\u9ad8\u7248\u672c \u6570\u636e\u5e93\u5de5\u5177&#xff1a;Navicat11 \u5f00\u53d1\u8f6f\u4ef6&#xff1a;PyCharm\/vs code \u524d\u7aef\u6846\u67b6:vue.js \u5c0f\u7a0b\u5e8f\u6846\u67b6&#xff1a;uniapp \u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8f6f\u4ef6&#xff1a;HBuilder X \u5c0f\u7a0b\u5e8f\u8fd0\u884c\u8f6f\u4ef6&#xff1a;\u5fae\u4fe1\u5f00\u53d1\u8005<\/p>\n<h2>\u4e8c\u3001\u9879\u76ee\u5185\u5bb9\u548c\u529f\u80fd\u4ecb\u7ecd<\/h2>\n<p>Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf\u4ecb\u7ecd \u7cfb\u7edf\u6982\u8ff0 \u672c\u7cfb\u7edf\u662f\u4e00\u4e2a\u7ed3\u5408Django\u540e\u7aef\u6846\u67b6\u548c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u524d\u7aef\u7684\u6821\u56ed\u98df\u5802\u667a\u80fd\u5316\u70b9\u9910\u8ba2\u9910\u89e3\u51b3\u65b9\u6848&#xff0c;\u65e8\u5728\u4e3a\u9ad8\u6821\u5e08\u751f\u63d0\u4f9b\u4fbf\u6377\u3001\u9ad8\u6548\u7684\u98df\u5802\u7528\u9910\u670d\u52a1&#xff0c;\u540c\u65f6\u5e2e\u52a9\u98df\u5802\u7ba1\u7406\u65b9\u4f18\u5316\u8fd0\u8425\u6d41\u7a0b\u3002 \u7cfb\u7edf\u67b6\u6784 \u540e\u7aef\u90e8\u5206&#xff08;Django\u6846\u67b6&#xff09; \u6838\u5fc3\u529f\u80fd&#xff1a; \u7528\u6237\u8ba4\u8bc1\u4e0e\u6388\u6743&#xff08;\u5fae\u4fe1OAuth2.0\u96c6\u6210&#xff09; \u83dc\u5355\u7ba1\u7406&#xff08;\u83dc\u54c1\u5206\u7c7b\u3001\u4e0a\u4e0b\u67b6\u3001\u4ef7\u683c\u8c03\u6574&#xff09; \u8ba2\u5355\u5904\u7406&#xff08;\u63a5\u6536\u3001\u786e\u8ba4\u3001\u72b6\u6001\u66f4\u65b0&#xff09; \u652f\u4ed8\u63a5\u53e3\u96c6\u6210&#xff08;\u5fae\u4fe1\u652f\u4ed8&#xff09; \u6570\u636e\u7edf\u8ba1\u4e0e\u5206\u6790&#xff08;\u9500\u552e\u6570\u636e\u3001\u7528\u6237\u884c\u4e3a&#xff09; \u901a\u77e5\u7cfb\u7edf&#xff08;\u8ba2\u5355\u72b6\u6001\u53d8\u66f4\u63d0\u9192&#xff09; \u6280\u672f\u7279\u70b9&#xff1a; RESTful API\u8bbe\u8ba1 Django REST Framework\u5b9e\u73b0\u63a5\u53e3 Celery\u5f02\u6b65\u4efb\u52a1\u5904\u7406&#xff08;\u8ba2\u5355\u8d85\u65f6\u53d6\u6d88\u7b49&#xff09; Redis\u7f13\u5b58\u4f18\u5316\u6027\u80fd MySQL\u6570\u636e\u5e93\u5b58\u50a8 \u524d\u7aef\u90e8\u5206&#xff08;\u5fae\u4fe1\u5c0f\u7a0b\u5e8f&#xff09; \u7528\u6237\u7aef\u529f\u80fd&#xff1a; \u5fae\u4fe1\u6388\u6743\u767b\u5f55 \u98df\u5802\u83dc\u5355\u6d4f\u89c8&#xff08;\u5206\u7c7b\u5c55\u793a\u3001\u641c\u7d22&#xff09; \u8d2d\u7269\u8f66\u7ba1\u7406 \u5728\u7ebf\u652f\u4ed8 \u8ba2\u5355\u8ddf\u8e2a \u8bc4\u4ef7\u53cd\u9988 \u5386\u53f2\u8ba2\u5355\u67e5\u8be2 \u7ba1\u7406\u7aef\u529f\u80fd&#xff08;\u53ef\u9009\u5c0f\u7a0b\u5e8f\u6216Web\u7aef&#xff09;&#xff1a; \u83dc\u5355\u7ba1\u7406 \u8ba2\u5355\u5904\u7406 \u6570\u636e\u770b\u677f \u7528\u6237\u53cd\u9988\u7ba1\u7406 \u6838\u5fc3\u529f\u80fd\u6a21\u5757 \u7528\u6237\u7cfb\u7edf \u5fae\u4fe1\u5feb\u901f\u767b\u5f55 \u4e2a\u4eba\u4fe1\u606f\u7ba1\u7406 \u5730\u5740\/\u53d6\u9910\u70b9\u7ba1\u7406 \u83dc\u5355\u7ba1\u7406 \u6309\u98df\u5802\/\u7a97\u53e3\u5206\u7c7b\u5c55\u793a \u83dc\u54c1\u8be6\u60c5&#xff08;\u56fe\u7247\u3001\u4ef7\u683c\u3001\u63cf\u8ff0&#xff09; \u6bcf\u65e5\u7279\u4ef7\/\u63a8\u8350\u83dc\u54c1 \u8425\u517b\u4fe1\u606f\u5c55\u793a \u8ba2\u9910\u6d41\u7a0b \u9009\u62e9\u83dc\u54c1\u2192\u52a0\u5165\u8d2d\u7269\u8f66\u2192\u63d0\u4ea4\u8ba2\u5355\u2192\u652f\u4ed8 \u9884\u7ea6\u53d6\u9910\u65f6\u95f4 \u591a\u79cd\u652f\u4ed8\u65b9\u5f0f\u96c6\u6210 \u8ba2\u5355\u7ba1\u7406 \u5b9e\u65f6\u8ba2\u5355\u72b6\u6001\u8ddf\u8e2a \u53d6\u6d88\u8ba2\u5355\u529f\u80fd&#xff08;\u9650\u65f6&#xff09; \u7535\u5b50\u5c0f\u7968\u751f\u6210 \u8bc4\u4ef7\u7cfb\u7edf \u83dc\u54c1\u8bc4\u5206 \u6587\u5b57\u8bc4\u4ef7 \u56fe\u7247\u4e0a\u4f20 \u901a\u77e5\u7cfb\u7edf \u8ba2\u5355\u72b6\u6001\u53d8\u66f4\u63d0\u9192 \u65b0\u83dc\u54c1\u63a8\u9001 \u4f18\u60e0\u6d3b\u52a8\u901a\u77e5 \u6280\u672f\u4f18\u52bf \u5f00\u53d1\u6548\u7387\u9ad8&#xff1a;Django\u7684&#034;\u5f00\u7bb1\u5373\u7528&#034;\u7279\u6027\u5927\u5e45\u7f29\u77ed\u5f00\u53d1\u5468\u671f \u6269\u5c55\u6027\u5f3a&#xff1a;\u6a21\u5757\u5316\u8bbe\u8ba1\u4fbf\u4e8e\u529f\u80fd\u6269\u5c55 \u5b89\u5168\u6027\u597d&#xff1a;Django\u5185\u7f6eCSRF\u4fdd\u62a4\u3001XSS\u9632\u62a4\u7b49\u5b89\u5168\u673a\u5236 \u6027\u80fd\u4f18\u5316&#xff1a;\u7ed3\u5408Redis\u7f13\u5b58\u548cCelery\u5f02\u6b65\u4efb\u52a1\u5904\u7406\u9ad8\u5e76\u53d1 \u5fae\u4fe1\u751f\u6001\u96c6\u6210&#xff1a;\u65e0\u7f1d\u5bf9\u63a5\u5fae\u4fe1\u767b\u5f55\u3001\u652f\u4ed8\u3001\u6d88\u606f\u901a\u77e5\u7b49\u529f\u80fd \u5e94\u7528\u573a\u666f \u65e5\u5e38\u7528\u9910&#xff1a;\u5e08\u751f\u53ef\u63d0\u524d\u9884\u8ba2&#xff0c;\u51cf\u5c11\u73b0\u573a\u6392\u961f\u65f6\u95f4 \u7279\u6b8a\u9700\u6c42&#xff1a;\u652f\u6301\u7d20\u98df\u3001\u6e05\u771f\u7b49\u7279\u6b8a\u996e\u98df\u8981\u6c42 \u56e2\u4f53\u8ba2\u9910&#xff1a;\u73ed\u7ea7\u6216\u793e\u56e2\u6d3b\u52a8\u6279\u91cf\u8ba2\u9910 \u6570\u636e\u5206\u6790&#xff1a;\u5e2e\u52a9\u98df\u5802\u4e86\u89e3\u83dc\u54c1\u53d7\u6b22\u8fce\u7a0b\u5ea6&#xff0c;\u4f18\u5316\u91c7\u8d2d\u548c\u5907\u9910 \u5b9e\u65bd\u6548\u76ca \u5bf9\u5b66\u751f&#xff1a; \u8282\u7701\u6392\u961f\u65f6\u95f4 \u591a\u6837\u5316\u9009\u62e9 \u900f\u660e\u5316\u4ef7\u683c \u5bf9\u98df\u5802&#xff1a; \u51cf\u5c11\u98df\u7269\u6d6a\u8d39 \u4f18\u5316\u4eba\u529b\u914d\u7f6e \u63d0\u5347\u670d\u52a1\u54c1\u8d28 \u5bf9\u5b66\u6821&#xff1a; \u63d0\u5347\u6570\u5b57\u5316\u6821\u56ed\u5f62\u8c61 \u6536\u96c6\u7528\u9910\u6570\u636e\u8f85\u52a9\u51b3\u7b56 \u75ab\u60c5\u671f\u95f4\u51cf\u5c11\u4eba\u5458\u805a\u96c6 \u6269\u5c55\u529f\u80fd\u5efa\u8bae \u79ef\u5206\u7cfb\u7edf&#xff1a;\u7528\u9910\u79ef\u5206\u5151\u6362\u793c\u54c1 \u62fc\u5355\u529f\u80fd&#xff1a;\u9f13\u52b1\u5b66\u751f\u62fc\u5355\u4eab\u53d7\u4f18\u60e0 \u667a\u80fd\u63a8\u8350&#xff1a;\u57fa\u4e8e\u5386\u53f2\u8ba2\u5355\u7684\u4e2a\u6027\u5316\u63a8\u8350 \u8425\u517b\u5206\u6790&#xff1a;\u6839\u636e\u8ba2\u5355\u8ba1\u7b97\u6bcf\u65e5\u8425\u517b\u6444\u5165 \u98df\u5802\u5bfc\u822a&#xff1a;\u5ba4\u5185\u5730\u56fe\u5f15\u5bfc\u81f3\u53d6\u9910\u7a97\u53e3 \u8be5\u7cfb\u7edf\u901a\u8fc7\u73b0\u4ee3\u5316\u6280\u672f\u624b\u6bb5\u6539\u9020\u4f20\u7edf\u6821\u56ed\u98df\u5802\u670d\u52a1\u6a21\u5f0f&#xff0c;\u65e2\u63d0\u5347\u4e86\u7528\u6237\u4f53\u9a8c&#xff0c;\u53c8\u5e2e\u52a9\u98df\u5802\u7ba1\u7406\u65b9\u5b9e\u73b0\u7cbe\u7ec6\u5316\u8fd0\u8425&#xff0c;\u662f\u667a\u6167\u6821\u56ed\u5efa\u8bbe\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002<\/p>\n<h2>\u4e09\u3001\u6838\u5fc3\u4ee3\u7801<\/h2>\n<p>\u90e8\u5206\u4ee3\u7801&#xff1a;<\/p>\n<p>package com<span class=\"token punctuation\">.<\/span>controller<span class=\"token punctuation\">;<\/span><\/p>\n<p>import java<span class=\"token punctuation\">.<\/span>util<span class=\"token punctuation\">.<\/span>Arrays<span class=\"token punctuation\">;<\/span><br \/>\nimport java<span class=\"token punctuation\">.<\/span>util<span class=\"token punctuation\">.<\/span>Map<span class=\"token punctuation\">;<\/span><\/p>\n<p>import org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>beans<span class=\"token punctuation\">.<\/span>factory<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>Autowired<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>PathVariable<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>PostMapping<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>RequestBody<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>RequestMapping<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>RequestParam<span class=\"token punctuation\">;<\/span><br \/>\nimport org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>RestController<span class=\"token punctuation\">;<\/span><\/p>\n<p>import com<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span>IgnoreAuth<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>baomidou<span class=\"token punctuation\">.<\/span>mybatisplus<span class=\"token punctuation\">.<\/span>mapper<span class=\"token punctuation\">.<\/span>EntityWrapper<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>entity<span class=\"token punctuation\">.<\/span>ConfigEntity<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>service<span class=\"token punctuation\">.<\/span>ConfigService<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>utils<span class=\"token punctuation\">.<\/span>MPUtil<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>utils<span class=\"token punctuation\">.<\/span>PageUtils<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>utils<span class=\"token punctuation\">.<\/span>R<span class=\"token punctuation\">;<\/span><br \/>\nimport com<span class=\"token punctuation\">.<\/span>utils<span class=\"token punctuation\">.<\/span>ValidatorUtils<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n * \u767b\u5f55\u76f8\u5173<br \/>\n *\/<\/span><br \/>\n&#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;config&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n&#064;RestController<br \/>\npublic class ConfigController<span class=\"token punctuation\">{<\/span><\/p>\n<p>&#064;Autowired<br \/>\nprivate ConfigService configService<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n     * \u5217\u8868<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/page&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">page<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestParam Map<span class=\"token operator\">&lt;<\/span>String<span class=\"token punctuation\">,<\/span> Object<span class=\"token operator\">&gt;<\/span> params<span class=\"token punctuation\">,<\/span>ConfigEntity config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        EntityWrapper<span class=\"token operator\">&lt;<\/span>ConfigEntity<span class=\"token operator\">&gt;<\/span> ew <span class=\"token operator\">&#061;<\/span> new EntityWrapper<span class=\"token operator\">&lt;<\/span>ConfigEntity<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    PageUtils page <span class=\"token operator\">&#061;<\/span> configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">queryPage<\/span><span class=\"token punctuation\">(<\/span>params<span class=\"token punctuation\">,<\/span> MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">sort<\/span><span class=\"token punctuation\">(<\/span>MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">between<\/span><span class=\"token punctuation\">(<\/span>MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">likeOrEq<\/span><span class=\"token punctuation\">(<\/span>ew<span class=\"token punctuation\">,<\/span> config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> params<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> params<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;data&#034;<\/span><span class=\"token punctuation\">,<\/span> page<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/**<br \/>\n     * \u5217\u8868<br \/>\n     *\/<\/span><br \/>\n    &#064;IgnoreAuth<br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/list&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">list<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestParam Map<span class=\"token operator\">&lt;<\/span>String<span class=\"token punctuation\">,<\/span> Object<span class=\"token operator\">&gt;<\/span> params<span class=\"token punctuation\">,<\/span>ConfigEntity config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        EntityWrapper<span class=\"token operator\">&lt;<\/span>ConfigEntity<span class=\"token operator\">&gt;<\/span> ew <span class=\"token operator\">&#061;<\/span> new EntityWrapper<span class=\"token operator\">&lt;<\/span>ConfigEntity<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    PageUtils page <span class=\"token operator\">&#061;<\/span> configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">queryPage<\/span><span class=\"token punctuation\">(<\/span>params<span class=\"token punctuation\">,<\/span> MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">sort<\/span><span class=\"token punctuation\">(<\/span>MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">between<\/span><span class=\"token punctuation\">(<\/span>MPUtil<span class=\"token punctuation\">.<\/span><span class=\"token function\">likeOrEq<\/span><span class=\"token punctuation\">(<\/span>ew<span class=\"token punctuation\">,<\/span> config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> params<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> params<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;data&#034;<\/span><span class=\"token punctuation\">,<\/span> page<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u4fe1\u606f<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/info\/{id}&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span>&#064;<span class=\"token function\">PathVariable<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;id&#034;<\/span><span class=\"token punctuation\">)<\/span> String id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        ConfigEntity config <span class=\"token operator\">&#061;<\/span> configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">selectById<\/span><span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;data&#034;<\/span><span class=\"token punctuation\">,<\/span> config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u8be6\u60c5<br \/>\n     *\/<\/span><br \/>\n    &#064;IgnoreAuth<br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/detail\/{id}&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">detail<\/span><span class=\"token punctuation\">(<\/span>&#064;<span class=\"token function\">PathVariable<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;id&#034;<\/span><span class=\"token punctuation\">)<\/span> String id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        ConfigEntity config <span class=\"token operator\">&#061;<\/span> configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">selectById<\/span><span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;data&#034;<\/span><span class=\"token punctuation\">,<\/span> config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u6839\u636ename\u83b7\u53d6\u4fe1\u606f<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/info&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">infoByName<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestParam String name<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        ConfigEntity config <span class=\"token operator\">&#061;<\/span> configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">selectOne<\/span><span class=\"token punctuation\">(<\/span>new EntityWrapper<span class=\"token operator\">&lt;<\/span>ConfigEntity<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">eq<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;name&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;faceFile&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">put<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;data&#034;<\/span><span class=\"token punctuation\">,<\/span> config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u4fdd\u5b58<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">PostMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/save&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">save<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestBody ConfigEntity config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">\/\/    ValidatorUtils.validateEntity(config);<\/span><br \/>\n    configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">insert<\/span><span class=\"token punctuation\">(<\/span>config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u4fee\u6539<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/update&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">update<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestBody ConfigEntity config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">\/\/        ValidatorUtils.validateEntity(config);<\/span><br \/>\n        configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">updateById<\/span><span class=\"token punctuation\">(<\/span>config<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><span class=\"token comment\">\/\/\u5168\u90e8\u66f4\u65b0<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * \u5220\u9664<br \/>\n     *\/<\/span><br \/>\n    &#064;<span class=\"token function\">RequestMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/delete&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    public R <span class=\"token function\">delete<\/span><span class=\"token punctuation\">(<\/span>&#064;RequestBody Long<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> ids<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n    configService<span class=\"token punctuation\">.<\/span><span class=\"token function\">deleteBatchIds<\/span><span class=\"token punctuation\">(<\/span>Arrays<span class=\"token punctuation\">.<\/span><span class=\"token function\">asList<\/span><span class=\"token punctuation\">(<\/span>ids<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> R<span class=\"token punctuation\">.<\/span><span class=\"token function\">ok<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h2>\u56db\u3001\u6548\u679c\u56fe<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154159-69860bc7b3de4.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154200-69860bc8b7bf4.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154201-69860bc9c2f65.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154202-69860bcacb0e9.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154203-69860bcbb2d21.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154204-69860bcc9830d.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154205-69860bcdb8454.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154206-69860bceac8d7.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154207-69860bcf9096a.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154208-69860bd088944.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154209-69860bd188f12.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154210-69860bd274572.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154211-69860bd37503b.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154212-69860bd46300d.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154213-69860bd545e44.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154214-69860bd6294dc.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154215-69860bd70c8aa.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154215-69860bd7ec8ae.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154216-69860bd8dafd3.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154217-69860bd9cd0db.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-02-06kvu1oi32b4t.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-02-06vgygoyvids3.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-02-06m3nezc2i3fl.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-02-06z4d32kfx3ec.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e94 \u3001\u8d44\u6599\u83b7\u53d6<\/h2>\n<p><font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"4\">\u6587\u7ae0\u4e0b\u65b9\u540d\u7247\u8054\u7cfb\u6211\u5373\u53ef~ <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#0099CC\" size=\"4\">\u7cbe\u5f69\u4e13\u680f\u63a8\u8350\u8ba2\u9605&#xff1a;\u5728\u4e0b\u65b9\u4e13\u680f&#x1f447;&#x1f3fb;<\/font> <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" size=\"4\">\u6bd5\u4e1a\u8bbe\u8ba1\u7cbe\u54c1\u5b9e\u6218\u6848\u4f8b<\/font> <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"4\">\u6536\u85cf\u5173\u6ce8\u4e0d\u8ff7\u8def&#xff01;&#xff01;<\/font> <font face=\"\u5fae\u8f6f\u96c5\u9ed1\" color=\"#FF0000\" size=\"4\">&#x1f31f;\u6587\u672b\u83b7\u53d6\u8bbe\u8ba1&#x1f31f;<\/font><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6536\u85cf\u5173\u6ce8\u4e0d\u8ff7\u8def&#xff01;&#xff01; &#x1f31f;\u6587\u672b\u83b7\u53d6\u6e90\u7801\u6570\u636e\u5e93&#x1f31f; \u611f\u5174\u8da3\u7684\u53ef\u4ee5\u5148\u6536\u85cf\u8d77\u6765&#xff0c;\u8fd8\u6709\u5927\u5bb6\u5728\u6bd5\u8bbe\u9009\u9898&#xff08;\u514d\u8d39\u54a8\u8be2\u6307\u5bfc\u9009\u9898&#xff09;&#xff0c;\u9879\u76ee\u4ee5\u53ca\u8bba\u6587\u7f16\u5199\u7b49\u76f8\u5173\u95ee\u9898\u90fd\u53ef\u4ee5\u7ed9\u6211\u7559\u8a00\u54a8\u8be2&#xff0c;\u5e0c\u671b\u5e2e\u52a9\u66f4\u591a\u7684\u4eba \u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u9879\u76ee\u6280\u672f\u4e8c\u3001\u9879\u76ee\u5185\u5bb9\u548c\u529f\u80fd\u4ecb\u7ecd\u4e09\u3001\u6838\u5fc3\u4ee3\u7801\u56db\u3001\u6548\u679c\u56fe\u4e94 \u3001\u8d44\u6599\u83b7\u53d6\u4e00\u3001\u9879\u76ee\u6280\u672f<br \/>\n\u5f00\u53d1\u8bed\u8a00&#xff1a;Python python\u6846\u67b6&#xff1a;Django <\/p>\n","protected":false},"author":2,"featured_media":73046,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[890,81,555],"topic":[],"class_list":["post-73066","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-django","tag-python","tag-555"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\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\/73066.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6536\u85cf\u5173\u6ce8\u4e0d\u8ff7\u8def&#xff01;&#xff01; &#x1f31f;\u6587\u672b\u83b7\u53d6\u6e90\u7801\u6570\u636e\u5e93&#x1f31f; \u611f\u5174\u8da3\u7684\u53ef\u4ee5\u5148\u6536\u85cf\u8d77\u6765&#xff0c;\u8fd8\u6709\u5927\u5bb6\u5728\u6bd5\u8bbe\u9009\u9898&#xff08;\u514d\u8d39\u54a8\u8be2\u6307\u5bfc\u9009\u9898&#xff09;&#xff0c;\u9879\u76ee\u4ee5\u53ca\u8bba\u6587\u7f16\u5199\u7b49\u76f8\u5173\u95ee\u9898\u90fd\u53ef\u4ee5\u7ed9\u6211\u7559\u8a00\u54a8\u8be2&#xff0c;\u5e0c\u671b\u5e2e\u52a9\u66f4\u591a\u7684\u4eba \u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u9879\u76ee\u6280\u672f\u4e8c\u3001\u9879\u76ee\u5185\u5bb9\u548c\u529f\u80fd\u4ecb\u7ecd\u4e09\u3001\u6838\u5fc3\u4ee3\u7801\u56db\u3001\u6548\u679c\u56fe\u4e94 \u3001\u8d44\u6599\u83b7\u53d6\u4e00\u3001\u9879\u76ee\u6280\u672f \u5f00\u53d1\u8bed\u8a00&#xff1a;Python python\u6846\u67b6&#xff1a;Django\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/73066.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-06T15:42:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154159-69860bc7b3de4.jpg\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73066.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/73066.html\",\"name\":\"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-06T15:42:19+00:00\",\"dateModified\":\"2026-02-06T15:42:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/73066.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/73066.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73066.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\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":"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\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\/73066.html","og_locale":"zh_CN","og_type":"article","og_title":"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6536\u85cf\u5173\u6ce8\u4e0d\u8ff7\u8def&#xff01;&#xff01; &#x1f31f;\u6587\u672b\u83b7\u53d6\u6e90\u7801\u6570\u636e\u5e93&#x1f31f; \u611f\u5174\u8da3\u7684\u53ef\u4ee5\u5148\u6536\u85cf\u8d77\u6765&#xff0c;\u8fd8\u6709\u5927\u5bb6\u5728\u6bd5\u8bbe\u9009\u9898&#xff08;\u514d\u8d39\u54a8\u8be2\u6307\u5bfc\u9009\u9898&#xff09;&#xff0c;\u9879\u76ee\u4ee5\u53ca\u8bba\u6587\u7f16\u5199\u7b49\u76f8\u5173\u95ee\u9898\u90fd\u53ef\u4ee5\u7ed9\u6211\u7559\u8a00\u54a8\u8be2&#xff0c;\u5e0c\u671b\u5e2e\u52a9\u66f4\u591a\u7684\u4eba \u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u9879\u76ee\u6280\u672f\u4e8c\u3001\u9879\u76ee\u5185\u5bb9\u548c\u529f\u80fd\u4ecb\u7ecd\u4e09\u3001\u6838\u5fc3\u4ee3\u7801\u56db\u3001\u6548\u679c\u56fe\u4e94 \u3001\u8d44\u6599\u83b7\u53d6\u4e00\u3001\u9879\u76ee\u6280\u672f \u5f00\u53d1\u8bed\u8a00&#xff1a;Python python\u6846\u67b6&#xff1a;Django","og_url":"https:\/\/www.wsisp.com\/helps\/73066.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-06T15:42:19+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260206154159-69860bc7b3de4.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/73066.html","url":"https:\/\/www.wsisp.com\/helps\/73066.html","name":"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-06T15:42:19+00:00","dateModified":"2026-02-06T15:42:19+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/73066.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/73066.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/73066.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Django\u57fa\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6821\u56ed\u98df\u5802\u70b9\u9910\u8ba2\u9910\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\/73066","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=73066"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/73066\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/73046"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=73066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=73066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=73066"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=73066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}