{"id":64,"date":"2023-09-24T23:33:53","date_gmt":"2023-09-24T15:33:53","guid":{"rendered":"http:\/\/ai.gitpp.com\/?p=64"},"modified":"2023-09-24T23:33:53","modified_gmt":"2023-09-24T15:33:53","slug":"python-%e6%a1%86%e6%9e%b6-django","status":"publish","type":"post","link":"http:\/\/ai.gitpp.com\/index.php\/2023\/09\/24\/python-%e6%a1%86%e6%9e%b6-django\/","title":{"rendered":"Python \u6846\u67b6 \u00a0Django\u00a0"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>1\uff1a\u4ec0\u4e48\u662f Django\u00a0<\/p>\n\n\n\n<p>     \u5f88\u5feb\u505a\u51fa\u9879\u76ee\u7684\u4e3a \u6846\u67b6\u3002<\/p>\n\n\n\n<p>     \u5982\u679c\u8bed\u8a00\u662f  \u7816\u5934\uff0c\u6846\u67b6\u5c31\u662f \u6bdb\u576f\u623f\uff0c \u4f60\u7c89\u5237\u7c89\u5237\u5c31\u53ef\u4ee5\u4e86\uff0c\u4e0d\u7528\u4ece\u5934\u76d6\u623f\u5b50\u3002<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<p>2\uff1a\u5b89\u88c5\uff1a<\/p>\n\n\n\n<p>      <\/p>\n\n\n\n<p>\u6700\u65b0\u7248\u672c\u7684 Python \u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee&nbsp;<a href=\"https:\/\/www.python.org\/downloads\/\">https:\/\/www.python.org\/downloads\/<\/a>&nbsp;\u6216\u8005\u64cd\u4f5c\u7cfb\u7edf\u7684\u5305\u7ba1\u7406\u5de5\u5177\u83b7\u53d6\u3002<\/p>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728shell\u4e2d\u952e\u5165&#8220;python&#8220;\u6765\u9a8c\u8bc1Python\u662f\u5426\u5df2\u5b89\u88c5\uff1b\u4f60\u5e94\u8be5\u770b\u89c1\u5982\u4e0b\u8f93\u51fa\uff1aPython 3.x.y [GCC 4.x] on linux Type &#8220;help&#8221;, &#8220;copyright&#8221;, &#8220;credits&#8221; or &#8220;license&#8221; for more information. &gt;&gt;&gt;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e\u6570\u636e\u5e93<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/intro\/install\/#set-up-a-database\">\u00b6<\/a><\/h2>\n\n\n\n<p>\u6b64\u6b65\u9aa4\u4ec5\u5728\u4f60\u6253\u7b97\u4f7f\u7528\u8bf8\u5982 PostgreSQL\u3001MariaDB\u3001MySQL \u6216\u8005 Oracle \u8fd9\u4e9b\u5927\u578b\u6570\u636e\u5e93\u5f15\u64ce\u65f6\u9700\u8981\u3002\u8981\u5b89\u88c5\u8fd9\u79cd\u6570\u636e\u5e93, \u8bf7\u53c2\u8003&nbsp;<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/topics\/install\/#database-installation\">\u6570\u636e\u5e93\u5b89\u88c5\u4fe1\u606f<\/a>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b89\u88c5 Django<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/intro\/install\/#install-django\">\u00b6<\/a><\/h2>\n\n\n\n<p>\u5b89\u88c5 Django\u6709\u4ee5\u4e0b\u4e09\u79cd\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/topics\/install\/#installing-official-release\">\u5b89\u88c5\u6b63\u5f0f\u7248\u672c<\/a>&nbsp;\u9002\u5408\u5927\u90e8\u5206\u7528\u6237\u3002<\/li>\n\n\n\n<li>\u5b89\u88c5 Django&nbsp;<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/topics\/install\/#installing-distribution-package\">\u7531\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u53d1\u884c\u7248\u63d0\u4f9b<\/a>\u3002<\/li>\n\n\n\n<li><a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/topics\/install\/#installing-development-version\">\u5b89\u88c5\u6700\u65b0\u7684\u5f00\u53d1\u7248\u672c<\/a>&nbsp;\u8fd9\u4e2a\u9009\u62e9\u662f\u9488\u5bf9\u90a3\u4e9b\u60f3\u8981\u4f53\u9a8c\u6700\u65b0\u548c\u6700\u597d\u7684\u7279\u6027\u7684\u7231\u597d\u8005\u4eec\uff0c\u5e76\u4e0d\u6015\u8fd0\u884c\u5168\u65b0\u4ee3\u7801\u3002\u4f60\u5728\u5f00\u53d1\u7248\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u65b0\u7684 bug\uff0c\u53ef\u4ee5\u62a5\u544a\u7ed9\u793e\u533a\u56e2\u961f\u5e2e\u52a9 Django \u5f00\u53d1\u3002\u6b64\u5916\uff0c\u7b2c\u4e09\u65b9\u53d1\u884c\u7684\u8f6f\u4ef6\u5305\u4e5f\u53ef\u80fd\u4e0d\u4e0e\u5f00\u53d1\u7248\u8fdb\u884c\u517c\u5bb9\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8bf7\u59cb\u7ec8\u53c2\u8003\u4e0e\u4f60\u6240\u4f7f\u7528\u7684\u7248\u672c\u5bf9\u5e94\u7684 Django \u6587\u6863\uff01<\/p>\n\n\n\n<p>\u5982\u679c\u91c7\u7528\u4e86\u524d\u4e24\u79cd\u65b9\u5f0f\u8fdb\u884c\u5b89\u88c5\uff0c\u4f60\u9700\u8981\u6ce8\u610f\u5728\u6587\u6863\u4e2d\u6807\u660e&nbsp;<strong>\u5728\u5f00\u53d1\u7248\u4e2d\u65b0\u589e<\/strong>\u3002\u8fd9\u4e2a\u6807\u8bb0\u8868\u660e\u8fd9\u4e2a\u7279\u6027\u4ec5\u9002\u7528\u5f00\u53d1\u7248 Django\uff0c\u5e76\u4e14\u4ed6\u4eec\u53ef\u80fd\u4e0d\u4f1a\u5728\u5b98\u65b9\u53d1\u5e03\u7684\u7a33\u5b9a\u7248\u4e2d\u51fa\u73b0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u9a8c\u8bc1<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/intro\/install\/#verifying\">\u00b6<\/a><\/h2>\n\n\n\n<p>\u82e5\u8981\u9a8c\u8bc1 Django \u662f\u5426\u80fd\u88ab Python \u8bc6\u522b\uff0c\u53ef\u4ee5\u5728 shell \u4e2d\u8f93\u5165&nbsp;<code>python<\/code>\u3002 \u7136\u540e\u5728 Python \u63d0\u793a\u7b26\u4e0b\uff0c\u5c1d\u8bd5\u5bfc\u5165 Django\uff1a&gt;&gt;&gt; import django &gt;&gt;&gt; print(django.get_version()) 4.2<\/p>\n\n\n\n<p>\u5f53\u7136\u4e86\uff0c\u4f60\u4e5f\u53ef\u80fd\u5b89\u88c5\u7684\u662f\u5176\u5b83\u7248\u672c\u7684 Django\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u641e\u5b9a\uff01<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/intro\/install\/#that-s-it\">\u00b6<\/a><\/h2>\n\n\n\n<p>\u641e\u5b9a\uff0c\u73b0\u5728\u4f60\u53ef\u4ee5&nbsp;<a href=\"https:\/\/docs.djangoproject.com\/zh-hans\/4.2\/intro\/tutorial01\/\">\u8fdb\u5165\u6559\u7a0b<\/a>\u3002<\/p>\n\n\n\n<p>3\uff1a\u8be6\u7ec6\u6587\u6863\u5730\u5740\uff1a<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\uff1a\u4ec0\u4e48\u662f Django\u00a0 \u5f88\u5feb\u505a\u51fa\u9879\u76ee\u7684\u4e3a \u6846\u67b6\u3002 \u5982\u679c\u8bed\u8a00\u662f \u7816\u5934\uff0c\u6846\u67b6\u5c31\u662f \u6bdb\u576f\u623f\uff0c \u4f60\u7c89\u5237\u7c89\u5237\u5c31\u53ef\u4ee5\u4e86 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"blocksy_meta":"","_links":{"self":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":1,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":65,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions\/65"}],"wp:attachment":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}