{"id":49534,"date":"2023-07-07T05:31:13","date_gmt":"2023-03-11T21:25:36","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/"},"modified":"2024-04-30T12:24:08","modified_gmt":"2024-04-30T04:24:08","slug":"django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/","title":{"rendered":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55"},"content":{"rendered":"<h1>Django\u4e2a\u4eba\u5907\u5fd8\u5f55<\/h1>\n<p>\u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u5e16\uff0c\u6211\u60f3\u53ef\u80fd\u8fd8\u6709\u4e0d\u8db3\u4e4b\u5904\uff0c\u4f46\u6211\u4f1a\u7ed3\u5408\u590d\u4e60\u548c\u6574\u7406\u6765\u5199\u3002<\/p>\n<h2>\u5728\u5f00\u59cb\u5b66\u4e60Django\u4e4b\u524d\uff0c\u9700\u8981\u5148\u7406\u89e3\u201c\u6846\u67b6\u201d\u8fd9\u4e2a\u6982\u5ff5\u3002<\/h2>\n<p>&nbsp;<\/p>\n<h2>MTV\u6a21\u7279<\/h2>\n<p>\u6982\u8ff0<br \/>\n&#8211; \u6a21\u578b\uff08\u5b58\u50a8\u5728\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\uff09\u2190 \u6570\u636e\u5e93\uff0c\u8868\u683c\u76f8\u5173<br \/>\n&#8211; \u6a21\u677f\uff08\u7531\u6a21\u677f\u6587\u4ef6\u5b9a\u4e49\u7684\u6bcf\u4e2a\u9875\u9762\u7684\u8bbe\u8ba1\uff09\u2190 HTML\uff0cCSS\uff0cJavascript\u76f8\u5173<br \/>\n&#8211; \u89c6\u56fe\uff08\u51b3\u5b9a\u663e\u793a\u54ea\u4e2a\u9875\u9762\u7684\u8fc7\u7a0b\uff09\u2190 \u6838\u5fc3\u51fd\u6570<\/p>\n<h2>\u6570\u636e\u7ed3\u6784\u53cd\u6620<\/h2>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code>$python manage.py showmigrations \uff08\u78ba\u8a8d\uff09\r\n$python manage.py makemigrations \uff08migrations\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\uff09\r\n$python manage.py showmigrations\uff08\u78ba\u8a8d\uff09\r\n$python manage.py migrate \uff08\u53cd\u6620\uff09\r\n$python manage.py runserver \u2026.\u3067\u30b7\u30b9\u30c6\u30e0\u304c\u52d5\u304f\u306f\u305a\r\n<\/code><\/pre>\n<h2>MySQL, SQL<\/h2>\n<p>SQL\u7684\u6700\u4f4e\u8981\u6c42<\/p>\n<h2>\u7528Django\u9006\u5411\u5de5\u7a0b\u63d0\u53d6\u4fe1\u606f\u3002<\/h2>\n<p>&nbsp;<\/p>\n<h2>\u6a21\u677f\u7ee7\u627f<\/h2>\n<p>&nbsp;<\/p>\n<p>\u7ee7\u627f &#8211; Django\u6a21\u677f\u6807\u7b7e<br \/>\nhttps:\/\/www.geeksforgeeks.org\/extends-django-template-tags\/<\/p>\n<p>(Django\u6a21\u677f\u6807\u7b7e)\u7ee7\u627f\u529f\u80fd<\/p>\n<h2>\u5728Django\u4e2d\u7684\u5f00\u53d1\u6458\u8981<\/h2>\n<p>&nbsp;<\/p>\n<h2>\u4e2d\u6587\u8d44\u6599\uff0c\u6211\u4e2a\u4eba\u89c9\u5f97\u5f88\u6709\u6761\u7406\u3002<\/h2>\n<p>Django\uff08\u6846\u67b6\uff09<br \/>\nhttps:\/\/www.zhihu.com\/topic\/19572108\/hot<br \/>\n\u4f7f\u7528Python\u7684Django\u6846\u67b6\u7ed3\u5408SQL\u3001Pandas\u548cPyecharts\u6784\u5efa\u7684\u81ea\u5b9a\u4e49\u5728\u7ebf\u6570\u636e\u5206\u6790\u5e73\u53f0\uff08\u4e09\uff09<br \/>\nhttps:\/\/zhuanlan.zhihu.com\/p\/143369908<br \/>\nDjango\u6559\u7a0b<br \/>\nhttps:\/\/www.runoob.com\/django\/django-tutorial.html<\/p>\n<h2>\u5c06\u65e5\u672c\u8bed\u5316<\/h2>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528Django\u8868\u5355 + Bootstrap 4\uff0c\u8f7b\u677e\u521b\u5efa\u6b63\u5f0f\u7684\u201c\u8054\u7cfb\u6211\u4eec\u201d\u8868\u5355<\/h2>\n<p>&nbsp;<\/p>\n<h2>\u591a\u5bf9\u591a\u7684Django<\/h2>\n<p>&nbsp;<\/p>\n<h2>MySQL\u95ee\u9898\u7684\u8865\u5145\u7bc7<\/h2>\n<pre class=\"post-pre\"><code>$sudo apt-get install python3.6-dev libmysqlclient-dev\r\n$sudo apt-get install libsqlclient-dev\r\n$sudo apt-get install -y libmysqlclient-dev\r\n$sudo apt-get install -y default-libmysqlclient-dev\r\n$pip install mysqlclient\r\n$pip install mysql-python\r\n$pip install mysql-connector-python\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Django\u4e2a\u4eba\u5907\u5fd8\u5f55 \u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u5e16\uff0c\u6211\u60f3\u53ef\u80fd\u8fd8\u6709\u4e0d\u8db3\u4e4b\u5904\uff0c\u4f46\u6211\u4f1a\u7ed3\u5408\u590d\u4e60\u548c\u6574\u7406\u6765\u5199\u3002 \u5728\u5f00\u59cb\u5b66\u4e60Djan [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49534","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Django\u4e2a\u4eba\u5907\u5fd8\u5f55 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/django\u4e2a\u4eba\u5907\u5fd8\u5f55\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Django\u4e2a\u4eba\u5907\u5fd8\u5f55\" \/>\n<meta property=\"og:description\" content=\"Django\u4e2a\u4eba\u5907\u5fd8\u5f55 \u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u5e16\uff0c\u6211\u60f3\u53ef\u80fd\u8fd8\u6709\u4e0d\u8db3\u4e4b\u5904\uff0c\u4f46\u6211\u4f1a\u7ed3\u5408\u590d\u4e60\u548c\u6574\u7406\u6765\u5199\u3002 \u5728\u5f00\u59cb\u5b66\u4e60Djan [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/django\u4e2a\u4eba\u5907\u5fd8\u5f55\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-11T21:25:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T04:24:08+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u626c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u626c\" \/>\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.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/\",\"name\":\"Django\u4e2a\u4eba\u5907\u5fd8\u5f55 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-11T21:25:36+00:00\",\"dateModified\":\"2024-04-30T04:24:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Django\u4e2a\u4eba\u5907\u5fd8\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\",\"name\":\"\u6e05, \u626c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u626c\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/django\u4e2a\u4eba\u5907\u5fd8\u5f55\/","og_locale":"zh_CN","og_type":"article","og_title":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55","og_description":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55 \u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u5e16\uff0c\u6211\u60f3\u53ef\u80fd\u8fd8\u6709\u4e0d\u8db3\u4e4b\u5904\uff0c\u4f46\u6211\u4f1a\u7ed3\u5408\u590d\u4e60\u548c\u6574\u7406\u6765\u5199\u3002 \u5728\u5f00\u59cb\u5b66\u4e60Djan [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/django\u4e2a\u4eba\u5907\u5fd8\u5f55\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-11T21:25:36+00:00","article_modified_time":"2024-04-30T04:24:08+00:00","author":"\u6e05, \u626c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u626c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/","name":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-11T21:25:36+00:00","dateModified":"2024-04-30T04:24:08+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Django\u4e2a\u4eba\u5907\u5fd8\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461","name":"\u6e05, \u626c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","caption":"\u6e05, \u626c"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/django%e4%b8%aa%e4%ba%ba%e5%a4%87%e5%bf%98%e5%bd%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=49534"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49534\/revisions"}],"predecessor-version":[{"id":91895,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49534\/revisions\/91895"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=49534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=49534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=49534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}