{"id":346289,"date":"2023-04-28T07:35:07","date_gmt":"2023-04-28T06:35:07","guid":{"rendered":"https:\/\/blog.jetbrains.com\/pycharm\/2023\/04\/create-a-django-app-in-pycharm\/"},"modified":"2023-04-28T07:35:14","modified_gmt":"2023-04-28T06:35:14","slug":"create-a-django-app-in-pycharm","status":"publish","type":"pycharm","link":"https:\/\/blog.jetbrains.com\/ja\/pycharm\/2023\/04\/create-a-django-app-in-pycharm\/","title":{"rendered":"PyCharm \u3067 Django \u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b"},"content":{"rendered":"<p>Django \u306f\u958b\u767a\u8005\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3059\u3070\u3084\u304f\u69cb\u7bc9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3092\u4e3b\u306a\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u7fd2\u5f97\u3059\u308b\u3068\u3001\u6982\u5ff5\u3092\u672c\u756a\u904b\u7528\u304c\u53ef\u80fd\u306a\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5909\u3048\u308b\u307e\u3067\u306e\u884c\u7a0b\u304c\u77ed\u7e2e\u3055\u308c\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u305d\u306e\u884c\u7a0b\u3092\u3055\u3089\u306b\u77ed\u7e2e\u3057\u305f\u3044\u5834\u5408\u306f PyCharm \u3067\u306e Django \u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u65b9\u6cd5\u3092\u5b66\u7fd2\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u73fe\u5728\u5730\u306e\u73fe\u5728\u306e\u6c17\u6e29\u3092\u8868\u793a\u3059\u308b\u7c21\u5358\u306a Django \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u624b\u9806\u3092\u3059\u3079\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u4ed6\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u5834\u6240\u306e\u5929\u5019\u3092\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30d7\u30ea\u306b\u5bfe\u8a71\u6027\u3092\u5c0e\u5165\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u4ee5\u4e0b\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>PyCharm \u3067 Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/li>\n<li>\u30e2\u30c7\u30eb\u3001\u30d3\u30e5\u30fc\u3001\u304a\u3088\u3073\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/li>\n<li>API \u3092\u547c\u3073\u51fa\u3057\u3066\u5fdc\u7b54\u3092\u51e6\u7406\u3059\u308b\u3002<\/li>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3057\u3066\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u5b8c\u5168\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<a title=\"https:\/\/github.com\/denis-mashutin\/weather-app-tutorial\" href=\"https:\/\/github.com\/denis-mashutin\/weather-app-tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u3092\u30af\u30ed\u30fc\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30af\u30ed\u30fc\u30f3\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/www.jetbrains.com\/help\/pycharm\/cloning-repository.html\" target=\"_blank\" rel=\"noopener\">PyCharm \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><!--more--><\/p>\n<h1>\u524d\u63d0\u6761\u4ef6<\/h1>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f Python \u306e\u7d4c\u9a13\u304c 2\uff5e3 \u5e74\u3042\u308b\u958b\u767a\u8005\u3092\u5bfe\u8c61\u3068\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u304a\u4f7f\u3044\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306b Python \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u3053\u3068\u304c\u524d\u63d0\u3067\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u306a\u304f\u3066\u3082\u5927\u4e08\u592b\u3067\u3059\uff01 \u5fc5\u8981\u306a Python \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001PyCharm \u3067\u6700\u521d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Django \u306e\u30b5\u30dd\u30fc\u30c8\u306f Professional \u306e\u6a5f\u80fd\u3067\u3042\u308b\u305f\u3081\u3001<a href=\"https:\/\/www.jetbrains.com\/pycharm\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">PyCharm Professional<\/a> \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 \u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u5411\u3051\u306b\u306f 30 \u65e5\u9593\u306e\u8a66\u7528\u671f\u9593\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3057\u3001\u5b66\u751f\u307e\u305f\u306f\u6559\u5e2b\u306e\u65b9\u306f<a href=\"https:\/\/www.jetbrains.com\/community\/education\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u7121\u6599\u6559\u80b2\u7528\u30e9\u30a4\u30bb\u30f3\u30b9<\/a>\u3092\u304a\u7533\u3057\u8fbc\u307f\u3044\u305f\u3060\u3051\u307e\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f <a href=\"https:\/\/www.jetbrains.com\/help\/pycharm\/2023.1\/new-ui.html\" target=\"_blank\" rel=\"noopener\">\u65b0\u3057\u3044 UI<\/a> \u3092\u6709\u52b9\u306b\u3057\u305f <strong>PyCharm 2023.1<\/strong> \u3067\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ed6\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u5411\u3051\u306e\u60c5\u5831\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u3001<a href=\"https:\/\/www.jetbrains.com\/help\/pycharm\/installation-guide.html\" target=\"_blank\" rel=\"noopener\">PyCharm \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30a2\u30d7\u30ea\u306e\u5236\u4f5c\u3092\u958b\u59cb\u3059\u308b<\/h1>\n<p>\u306f\u3058\u3081\u306e\u4e00\u6b69\u3067\u3059\u3002 \u3053\u3053\u3067\u5b9f\u65bd\u3059\u308b\u624b\u9806\u306f\u591a\u304f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u6700\u7d42\u7684\u306b\u306f\u57fa\u672c\u7684\u306a\u30ec\u30d9\u30eb\u3067\u30a2\u30d7\u30ea\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>PyCharm \u3067 Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001PyCharm \u3092\u8d77\u52d5\u3057\u3066 <strong>New Project<\/strong>\uff08\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002 PyCharm \u304c\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc\u304b\u3089 <strong>File\uff08\u30d5\u30a1\u30a4\u30eb\uff09| New Project\uff08\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><strong>New Project<\/strong>\uff08\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u3044\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334829\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-47.png\" alt=\"PyCharm \u3067 Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\" width=\"1600\" height=\"1300\" \/><\/figure>\n<\/div>\n<ol>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30bf\u30a4\u30d7\u306b\u306f <strong>Django<\/strong> \u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/li>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4fdd\u5b58\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3092\u5165\u529b\u3057\u307e\u3059\u3002 \u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3068\u3057\u3066\u3082\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u65b0\u3057\u3044 Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u7528\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002PyCharm \u306f\u3053\u306e\u74b0\u5883\u306b\u4f9d\u5b58\u95a2\u4fc2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u76ee\u7684\u306e\u305f\u3081\u306b\u3001<strong>virtualenv<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/li>\n<li>PyCharm \u3067\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067\u3059\u3050\u306b Django \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u5fc5\u305a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u540d\u524d\u3092\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ol>\n<p>\u6e96\u5099\u304c\u6574\u3063\u305f\u3089\u3001<strong>Create<\/strong>\uff08\u4f5c\u6210\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002 PyCharm \u304c\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u3092\u4f5c\u6210\u3057\u3001Django \u3084\u305d\u306e\u4ed6\u306e\u5fc5\u8981\u306a\u4f9d\u5b58\u95a2\u4fc2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u00a0<\/p>\n<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u6700\u4e0a\u90e8\u306b\u3042\u308b <strong>Run <\/strong>\uff08\u5b9f\u884c\uff09\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066 Django \u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334851\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/run_for_the_first_time.png\" alt=\"Django \u30b5\u30fc\u30d0\u30fc\u3092\u5b9f\u884c\u3059\u308b\" width=\"1956\" height=\"1328\" \/><\/figure>\n<\/div>\n<p><strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u304d\u307e\u3059\u3002 \u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u30fc\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334885\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/django_server_running-1.png\" alt=\"\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u306e Django \u30b5\u30fc\u30d0\u30fc\u30da\u30fc\u30b8\" width=\"1980\" height=\"1194\" \/><\/figure>\n<\/div>\n<p>\u308f\u305a\u304b\u6570\u5206\u3067 Django \u30b5\u30fc\u30d0\u30fc\u304c PyCharm \u5185\u3067\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u51fa\u3060\u3057\u306f\u9806\u8abf\u3067\u3059\u306d\u3002\u3067\u3082\u3001\u3053\u3053\u304b\u3089\u304c\u672c\u756a\u3067\u3059\u3002<\/p>\n<h2>\u306f\u3058\u3081\u3066\u306e\u30d3\u30e5\u30fc\u3092\u8a18\u8ff0\u3059\u308b<\/h2>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b8\u30c3\u30af\u306e\u4f5c\u6210\u306b\u53d6\u308a\u304b\u304b\u308a\u307e\u3057\u3087\u3046\u3002 Django \u3067\u306f <strong>views.py<\/strong> \u306b\u30af\u30e9\u30b9\u307e\u305f\u306f\u95a2\u6570\u3092\u8a18\u8ff0\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b8\u30c3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>PyCharm \u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u5de6\u4e0a\u306b\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u304b\u3001<strong>\u23181<\/strong> \/ <strong>Alt+1<\/strong> \u3092\u62bc\u3059\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u3092\u3044\u3064\u3067\u3082\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334873\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/project_tool_window.png\" alt=\"Project\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\" width=\"363\" height=\"554\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001<strong>\u21e7 (Shift)<\/strong> \u30922 \u56de\u62bc\u3057\u3066 <strong>Search Everywhere<\/strong>\uff08\u3069\u3053\u3067\u3082\u691c\u7d22\uff09\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u304f\u306a\u3069\u3001\u6642\u9593\u306e\u7bc0\u7d04\u306b\u306a\u308b\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f7f\u3046\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3001\u8a2d\u5b9a\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u306a\u3069\u3001\u5b9f\u8cea\u7684\u306b\u3042\u3089\u3086\u308b\u9805\u76ee\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066 <strong>views.py<\/strong> \u3092\u958b\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u300c<kbd>views<\/kbd>\u300d\u3068\u5165\u529b\u3057\u3001<strong>meteo<\/strong> \u306b\u3042\u308b <strong>views.py<\/strong> \u306b\u30ab\u30fc\u30bd\u30eb\u3092\u79fb\u52d5\u3057\u3001<strong>Enter<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334897\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/find_views.png\" alt=\"Search Everywhere\uff08\u3069\u3053\u3067\u3082\u691c\u7d22\uff09\u3092\u4f7f\u7528\u3059\u308b\" width=\"666\" height=\"243\" \/><\/figure>\n<\/div>\n<p><strong>views.py<\/strong> \u304c\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30bf\u30d6\u3067\u958b\u304d\u307e\u3059\u3002 \u307e\u305a\u306f <code>temp_here<\/code> \u95a2\u6570\u3092\u8a18\u8ff0\u3057\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u95a2\u6570\u306f\u73fe\u5728\u5730\u306e\u73fe\u5728\u306e\u6c17\u6e29\u3092\u8fd4\u3057\u307e\u3059\u3002\u00a0<\/p>\n<p>\u30a8\u30c7\u30a3\u30bf\u30fc\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import requests\n\n\ndef temp_here():\n    location = geocoder.ip('me').latlng\n    endpoint = \"https:\/\/api.open-meteo.com\/v1\/forecast\"\n    api_request = f\"{endpoint}?latitude={location[0]}&amp;longitude={location[1]}&amp;hourly=temperature_2m\"\n    return requests.get(api_request).json()<\/pre>\n<p>\u4f55\u3092\u884c\u3063\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f \u307e\u305a\u3001API \u547c\u3073\u51fa\u3057\u306b\u5fc5\u8981\u306a <code>requests<\/code> \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 import \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306b\u8d64\u3044\u6ce2\u7dda\u304c\u5f15\u304b\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u9078\u629e\u3055\u308c\u305f Python \u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u8d64\u3044\u6ce2\u7dda\u304c\u5f15\u304b\u308c\u305f\u5834\u6240\u306b\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u79fb\u52d5\u3057\u3001<strong>Install package requests<\/strong>\uff08requests \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-334980\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/install_requests.gif\" alt=\"requests \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\" width=\"875\" height=\"240\" \/><\/figure>\n<\/div>\n<p>\u73fe\u5728\u306e\u6c17\u6e29\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u3001<code>temp_here<\/code> \u304c <a href=\"https:\/\/open-meteo.com\/en\/docs\" target=\"_blank\" rel=\"noreferrer noopener\">Weather Forecast API<\/a> \u3078\u306e\u547c\u3073\u51fa\u3057\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306f API \u30ad\u30fc\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u7121\u6599\u306e API \u3067\u3059\u3002 \u3053\u3053\u3067\u77e5\u3063\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u306e\u306f\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\uff08<a href=\"https:\/\/api.open-meteo.com\/v1\/forecast\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/api.open-meteo.com\/v1\/forecast<\/a>\uff09\u3068\u5ea7\u6a19\u3060\u3051\u3067\u3059\u3002 \u5ea7\u6a19\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/geocoder.readthedocs.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Geocoder<\/a> \u3068\u3044\u3046\u3055\u307e\u3056\u307e\u306a\u5834\u6240\u306e\u5ea7\u6a19\u3092\u53d6\u5f97\u3067\u304d\u308b\u975e\u5e38\u306b\u5358\u7d14\u306a Python \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u8d64\u3044\u6ce2\u7dda\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u3066\u3044\u308b <code>geocoder<\/code> \u306b\u30ad\u30e3\u30ec\u30c3\u30c8\u3092\u7f6e\u3044\u3066 <strong>\u2325Enter<\/strong> \/ <strong>Alt+Enter<\/strong> \u3092\u62bc\u3057\u3001\u4f7f\u7528\u3067\u304d\u308b\u30af\u30a4\u30c3\u30af\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u8868\u793a\u3057\u307e\u3059\u3002 <strong>Install and import package \u2018geocoder\u2019<\/strong>\uff08\u30d1\u30c3\u30b1\u30fc\u30b8 \u2018geocoder\u2019 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335005\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/install_geocoder.png\" alt=\"Python \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\" width=\"597\" height=\"274\" \/><\/figure>\n<\/div>\n<p>PyCharm \u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b import \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30c6\u30b9\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066\u671f\u5f85\u901a\u308a\u306b\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002 Python \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u306e\u304c\u6700\u3082\u7c21\u5358\u3067\u3059\u3002<\/p>\n<p>\u6642\u9593\u306e\u7bc0\u7d04\u306b\u306a\u308b\u3082\u3046 1 \u3064\u306e\u6a5f\u80fd\u3001<strong>Find Action<\/strong>\uff08\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u691c\u7d22\uff09\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002 \u30de\u30a6\u30b9\u3067\u30e1\u30cb\u30e5\u30fc\u3092\u64cd\u4f5c\u3057\u305f\u308a\u3001\u591a\u6570\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u8a18\u61b6\u3057\u305f\u308a\u3057\u306a\u304f\u3066\u3082\u3001<strong>\u21e7\u2318A<\/strong> \/ <strong>Ctrl+Shift+A<\/strong> \u3092\u62bc\u3059\u3060\u3051\u3067 <strong>Run File in Python Console<\/strong>\uff08Python \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\uff09\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u3059\u3079\u3066\u306e\u6587\u5b57\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 <kbd>'rufipy'<\/kbd> \u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u3082\u3001\u76ee\u7684\u306e\u7d50\u679c\u3092\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335016\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/rufipy.png\" alt=\"\" width=\"670\" height=\"174\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001PyCharm \u306f import \u3068\u95a2\u6570\u306e\u5b9a\u7fa9\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 \u3067\u306f\u3001<code>temp_here<\/code> \u3092\u547c\u3073\u51fa\u3057\u307e\u3057\u3087\u3046\u3002 <strong>Tab <\/strong> \u3092\u62bc\u3059\u3068\u3001\u30b3\u30fc\u30c9\u88dc\u5b8c\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335028\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/autocompletion_python_console.png\" alt=\"Python \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u30b3\u30fc\u30c9\u88dc\u5b8c\u3092\u4f7f\u7528\u3059\u308b\" width=\"708\" height=\"285\" \/><\/figure>\n<\/div>\n<p>\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\u3067 API \u5fdc\u7b54\u3092\u8abf\u3079\u307e\u3059\u3002 \u975e\u5e38\u306b\u9577\u3044\u6587\u5b57\u5217\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u8aac\u660e\u56f3\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u81ea\u5206\u3067\u5fdc\u7b54\u3092\u8abf\u3079\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u51fa\u529b\u3092 3 \u56de\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>\u2318C<\/strong> \/ <strong>Ctrl+C<\/strong> \u3092\u62bc\u3057\u3066\u5fdc\u7b54\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u21e7\u2318N<\/strong> \/ <strong>Ctrl+Alt+Shift+Insert<\/strong> \u3092\u62bc\u3057\u3066\u30b9\u30af\u30e9\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001<strong>JSON<\/strong> \u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u3092\u9078\u629e\u3057\u307e\u3059\uff08<kbd>'js\u2026'<\/kbd> \u3092\u5165\u529b\u3059\u308b\u3060\u3051\u3067\u898b\u3064\u304b\u308a\u307e\u3059\uff09\u3002<\/li>\n<li>\u5fdc\u7b54\u3092\u8cbc\u308a\u4ed8\u3051\u305f\u3089 <strong>Reformat Code<\/strong>\uff08\u30b3\u30fc\u30c9\u306e\u6574\u5f62\uff09\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u9069\u7528\u3057\u307e\u3059\u3002 <strong>Find Action<\/strong>\uff08\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u691c\u7d22\uff09\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001<strong>\u2325\u2318L<\/strong> \/ <strong>Ctrl+Alt+L<\/strong> \u3092\u62bc\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u5fc5\u8981\u306a\u60c5\u5831\u306f\u3001<code>temperature_2m<\/code> \u30ad\u30fc\u306e <code>hourly<\/code> \u8981\u7d20\u306b\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u30ad\u30fc\u306f\u5024\u306e\u30ea\u30b9\u30c8\u3092\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u73fe\u5728\u306e\u6c17\u6e29\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u73fe\u5728\u306e\u6642\u9593\u3092\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u3057\u3066\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u73fe\u5728\u306e\u6642\u9593\u304c 14:30 \u3067\u3042\u308b\u5834\u5408\u306f\u30ea\u30b9\u30c8\u306e 14 \u756a\u76ee\u306e\u9805\u76ee\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335039\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/api_response_explained.png\" alt=\"API \u5fdc\u7b54\u3092\u8abf\u3079\u308b\" width=\"800\" height=\"637\" \/><\/figure>\n<\/div>\n<p><code>temp_here()['hourly']['temperature_2m'][14]<\/code> \u3067\u5fc5\u8981\u306a\u60c5\u5831\u3092\u53d6\u5f97\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u73fe\u5728\u306e\u6642\u9593\u306b\u5f93\u3063\u3066 <kbd>'14'<\/kbd> \u3092\u7f6e\u304d\u63db\u3048\u305f\u30b3\u30fc\u30c9\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335061\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/manual_request_console.png\" alt=\"Python \u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089 API \u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\" width=\"574\" height=\"270\" \/><\/figure>\n<\/div>\n<p>\u73fe\u5728\u5730\u306e\u73fe\u5728\u306e\u6c17\u6e29\u306f 14.9 \u00b0C \u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u3042\u306a\u305f\u306e\u7d50\u679c\u306f\u3069\u3046\u306a\u308a\u307e\u3057\u305f\u304b\uff1f<\/p>\n<p>API \u5fdc\u7b54\u304b\u3089\u73fe\u5728\u306e\u6c17\u6e29\u3092\u62bd\u51fa\u3059\u308b\u3088\u3046\u306b\u95a2\u6570\u3092\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"5-9\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def temp_here():\n    location = geocoder.ip('me').latlng\n    endpoint = \"https:\/\/api.open-meteo.com\/v1\/forecast\"\n    api_request = f\"{endpoint}?latitude={location[0]}&amp;longitude={location[1]}&amp;hourly=temperature_2m\"\n    now = datetime.now()\n    hour = now.hour\n    meteo_data = requests.get(api_request).json()\n    temp = meteo_data['hourly']['temperature_2m'][hour]\n    return temp<\/pre>\n<p><code>datetime<\/code> \u3092\u5fd8\u308c\u305a\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/import_datetime.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>Python \u30b3\u30f3\u30bd\u30fc\u30eb\u30c4\u30fc\u30eb\u30d0\u30fc\u306e\u5de6\u4e0a\u306b\u3042\u308b <strong>Rerun<\/strong>\uff08\u518d\u5b9f\u884c\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u66f4\u65b0\u3057\u305f\u95a2\u6570\u5b9a\u7fa9\u3092\u8aad\u307f\u8fbc\u307f\u76f4\u3057\u3066\u304b\u3089 <code>temp_here<\/code> \u3092\u3082\u3046\u4e00\u5ea6\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335092\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/rerun_same_result.png\" alt=\"\u66f4\u65b0\u3057\u305f\u95a2\u6570\u3092 Python \u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u547c\u3073\u51fa\u3059\" width=\"687\" height=\"222\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u7d50\u679c\u304c <code>temp_here<\/code> \u95a2\u6570\u306e\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u524d\u306e\u7d50\u679c\u3068\u7570\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001<strong>settings.py<\/strong> \u306e <code>TIME_ZONE<\/code> \u5024\u304c\u8aa4\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u00a0<\/p>\n<p>\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/docs.djangoproject.com\/en\/4.1\/ref\/settings\/#std-setting-TIME_ZONE\" target=\"_blank\" rel=\"noreferrer noopener\">Django \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u7d20\u65e9\u304f\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001<strong>\u21e7 (Shift)<\/strong> \u3092 2 \u56de\u62bc\u3057\u3001<strong>Tab<\/strong> \u3092\u6570\u56de\u62bc\u3057\u3066 <strong>Symbols<\/strong>\uff08\u30b7\u30f3\u30dc\u30eb\uff09\u306b\u5207\u308a\u66ff\u3048\u3001<kbd>'time\u2026'<\/kbd> \u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335103\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/time_zone_settings.png\" alt=\"Search Everywhere\uff08\u3069\u3053\u3067\u3082\u691c\u7d22\uff09\u3092\u4f7f\u7528\u3057\u3066\u8a2d\u5b9a\u3092\u691c\u7d22\u3059\u308b\" width=\"681\" height=\"267\" \/><\/figure>\n<\/div>\n<p>\u3067\u306f\u3001<code>temp_here<\/code> \u3092\u30d3\u30e5\u30fc\u95a2\u6570\u306b\u5909\u63db\u3057\u307e\u3057\u3087\u3046\u3002 \u3053\u306e\u95a2\u6570\u3092 Django \u306b\u30d3\u30e5\u30fc\u3068\u3057\u3066\u8a8d\u8b58\u3055\u305b\u308b\u306b\u306f\u3001<strong>HttpRequest <\/strong> \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6700\u521d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u53d7\u3051\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u540d\u524d\u306f\u901a\u5e38 <code>request<\/code> \u3067\u3059\u3002 <strong>HttpResponse<\/strong> \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3082\u8fd4\u3059\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>views.py<\/strong> \u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"8,16\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from datetime import datetime\n\nimport geocoder as geocoder\nimport requests\nfrom django.http import HttpResponse\n\n\ndef temp_here(request):\n    location = geocoder.ip('me').latlng\n    endpoint = \"https:\/\/api.open-meteo.com\/v1\/forecast\"\n    api_request = f\"{endpoint}?latitude={location[0]}&amp;longitude={location[1]}&amp;hourly=temperature_2m\"\n    now = datetime.now()\n    hour = now.hour\n    meteo_data = requests.get(api_request).json()\n    temp = meteo_data['hourly']['temperature_2m'][hour]\n    return HttpResponse(f\"Here it's {temp}\")<\/pre>\n<p>\u3054\u89a7\u306e\u3068\u304a\u308a\u3001\u307b\u3068\u3093\u3069\u5909\u66f4\u3057\u3066\u3044\u307e\u305b\u3093\u3002<code>temp_here<\/code> \u304c <code>request<\/code> \u3092\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308b\u3088\u3046\u306b\u306a\u308a\u3001<code>HttpResponse<\/code> \u3092\u6587\u5b57\u5217\u3092\u4e00\u7dd2\u306b\u8fd4\u3059\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6442\u6c0f\u306e\u4ee3\u308f\u308a\u306b\u83ef\u6c0f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001API \u30ea\u30af\u30a8\u30b9\u30c8\u306b <code>temperature_unit<\/code> \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u975e\u5e38\u306b\u7c21\u5358\u306b\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">api_request = f\"{endpoint}?latitude={location[0]}&amp;longitude={location[1]}&amp;hourly=temperature_2m&amp;temperature_unit=fahrenheit\"<\/pre>\n<p>\u6442\u6c0f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u5909\u66f4\u3092\u7701\u7565\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>URL \u306e\u69cb\u6210<\/h2>\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u304b\u3089\u30a2\u30d7\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u65b9\u6cd5\u3092\u69cb\u6210\u3059\u308b\u306b\u306f\u3001<strong>urls.py<\/strong> \u3092\u66f4\u65b0\u3057\u307e\u3059\u3002 \u524d\u8ff0\u306e\u3088\u3046\u306b <strong>Shift<\/strong> \u3092 2 \u56de\u62bc\u3057\u3001\u691c\u7d22\u3059\u308b URL \u3092\u5165\u529b\u3057\u3066\u958b\u304d\u307e\u3059\u3002<\/p>\n<p><code>urlpatterns<\/code> \u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 <strong>Reformat Code<\/strong>\uff08\u30b3\u30fc\u30c9\u306e\u6574\u5f62\uff09\u30a2\u30af\u30b7\u30e7\u30f3\u307e\u305f\u306f <strong>\u2325\u2318L<\/strong> \/ <strong>Ctrl+Alt+L<\/strong> \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u8cbc\u308a\u4ed8\u3051\u305f\u5f8c\u306e\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u7c21\u5358\u306b\u5fa9\u5143\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">path(\"\", include('meteo.urls')),<\/pre>\n<p><code>django.urls.include<\/code> \u304b\u3089 <code>include<\/code> \u3092\u5fd8\u308c\u305a\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>'meteo.urls'<\/code> \u306f\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b\u305f\u3081\u3001\u672a\u89e3\u6c7a\u306e\u53c2\u7167\u3067\u3042\u308b\u3053\u3068\u304c\u9ec4\u8272\u306e\u6ce2\u7dda\u3067\u793a\u3055\u308c\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<p>Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f\u901a\u5e38\u3001\u8907\u6570\u306e\u30a2\u30d7\u30ea\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u73fe\u6642\u70b9\u3067\u306f\u305d\u3046\u3067\u306a\u304f\u3066\u3082\u3001\u4eca\u5f8c\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u958b\u767a\u3092\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306e <strong>urls.py<\/strong> \u3092\u5bfe\u5fdc\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u4f5c\u6210\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e <strong>urls.py<\/strong> \u306b\u3059\u3079\u3066\u3092\u542b\u3081\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<strong>meteo<\/strong> \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u306b <strong>urls.py<\/strong> \u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>Project<\/strong>\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u3067 <strong>meteo<\/strong> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><strong>New\uff08\u65b0\u898f\uff09&gt; Python File\uff08Python \u30d5\u30a1\u30a4\u30eb\uff09<\/strong>\u3092\u9078\u629e\u3057\u3001<kbd>urls<\/kbd> \u3068\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\u65b0\u305f\u306b\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u958b\u304d\u307e\u3059\u3002 \u305d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from django.urls import path\nfrom . import views\n\n\nurlpatterns = [\n    path('meteo\/', views.temp_here, name='temp_here'),\n]<\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u3067 <kbd>&lt;\u30b5\u30fc\u30d0\u30fc\u30a2\u30c9\u30ec\u30b9&gt;\/meteo<\/kbd> \u306b\u79fb\u52d5\u3059\u308b\u3068\u3001<strong>views.py<\/strong> \u306e <code>temp_here<\/code> \u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u3001\u305d\u306e\u623b\u308a\u5024\u304c\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u52d5\u3044\u3066\u307e\u3059\uff01<\/h2>\n<p>\u53f3\u4e0a\u306e <strong>Rerun<\/strong>\uff08\u518d\u5b9f\u884c\uff09\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066 Django \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u5b9f\u884c\u3057\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335121\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/stop_and_rerun.png\" alt=\"Django \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u5b9f\u884c\u3059\u308b\" width=\"844\" height=\"397\" \/><\/figure>\n<\/div>\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u3067 <a href=\"http:\/\/127.0.0.1:8000\/meteo\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/127.0.0.1:8000\/meteo\/<\/a> \u3092\u958b\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335132\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-49.png\" alt=\"\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30da\u30fc\u30b8\" width=\"410\" height=\"207\" \/><\/figure>\n<\/div>\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u3092\u958b\u3044\u3066\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u3084 Django \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u624b\u52d5\u3067\u30da\u30fc\u30b8\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u3001PyCharm \u306e\u69cb\u6210\u3067\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3092\u958b\u304d\u3001<strong>Edit configurations<\/strong>\uff08\u69cb\u6210\u306e\u7de8\u96c6\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335143\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/edit_confiurations.png\" alt=\"\u5b9f\u884c\u69cb\u6210\u3092\u7de8\u96c6\u3059\u308b\" width=\"265\" height=\"215\" \/><\/figure>\n<\/div>\n<p>\u5de6\u30da\u30a4\u30f3\u306b\u3042\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u6210\u3092\u9078\u629e\u3057\u3001<strong>Run browser<\/strong>\uff08\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u5b9f\u884c\uff09\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30f3\u306b\u3057\u3001URL \u306b <kbd>meteo<\/kbd> \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335154\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/run_browser.png\" alt=\"URL \u3092\u69cb\u6210\u3059\u308b\" width=\"1040\" height=\"676\" \/><\/figure>\n<\/div>\n<p><strong>OK<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u5909\u66f4\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u6280\u8853\u7684\u306b\u306f\u30a2\u30d7\u30ea\u306f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u304c\u3001 \u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u306e\u898b\u6804\u3048\u306f\u3042\u307e\u308a\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u300c\u30e9\u30f3\u30c0\u30e0\u306a\u5834\u6240\u306e\u5929\u6c17\u300d\u6a5f\u80fd\u3082\u307e\u3060\u5099\u308f\u3063\u3066\u3044\u307e\u305b\u3093\u3002 \u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u306f\u3053\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5c0e\u5165\u3057\u3066\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h1>\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u6539\u5584\u3059\u308b<\/h1>\n<h2>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p><strong>views.py<\/strong> \u306b\u623b\u308a\u3001\u3082\u3046\u4e00\u5ea6 <code>temp_here<\/code> \u95a2\u6570\u3092\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002 \u307e\u3060 <strong>meteo\/urls.py<\/strong> \u3092\u958b\u3044\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u3059\u3050\u306b\u79fb\u52d5\u3067\u304d\u307e\u3059\u3002 <strong>\u2318<\/strong> \/ <strong>Ctrl<\/strong> \u3092\u62bc\u3057\u305f\u307e\u307e\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092 <code>temp_here<\/code> \u306b\u79fb\u52d5\u3057\u3001\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u306b\u5909\u308f\u3063\u305f\u3089\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335165\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/go_to_temp_here_from_urls-1.gif\" alt=\"\u95a2\u6570\u5b9a\u7fa9\u306b\u79fb\u52d5\u3059\u308b\" width=\"640\" height=\"480\" \/><\/figure>\n<\/div>\n<p>return \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u524d\u306b\u65b0\u3057\u3044\u884c\u3092\u8ffd\u52a0\u3057\u3001\u2018template = loader\u2019 \u3068\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u2325Enter<\/strong>\/ <strong>Alt+Enter<\/strong> \u3092\u62bc\u3057\u3066\u3001<code>django.template.loader<\/code> \u304b\u3089 <code>loader<\/code> \u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u30af\u30a4\u30c3\u30af\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/import_loader.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>\u6b21\u306b\u3001<code>get_template()<\/code> \u3092\u4f7f\u7528\u3057\u3066 <strong>index.html<\/strong> \u3092\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    template = loader.get_template('index.html')<\/pre>\n<p>return \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4ee5\u4e0b\u306e 2 \u884c\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    context = {'temp': temp}\n    return HttpResponse(template.render(context, request))<\/pre>\n<p><strong>Index.html<\/strong> \u306f\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\u3001\u9ec4\u8272\u306e\u6ce2\u7dda\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u307e\u3059\u3002 \u305d\u3053\u306b\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u79fb\u52d5\u3057\u3001<strong>Create template index.html<\/strong>\uff08\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 index.html \u306e\u4f5c\u6210\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335187\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/create_template.png\" alt=\"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\" width=\"550\" height=\"148\" \/><\/figure>\n<\/div>\n<p><strong>OK<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002 PyCharm \u304c <strong>index.html<\/strong> \u3092\u4f5c\u6210\u3057\u3001\u7de8\u96c6\u7528\u306b\u958b\u304d\u307e\u3059\u3002<\/p>\n<p>\u73fe\u5728\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u7a7a\u3067\u3059\u3002 <strong>Live Template<\/strong>\uff08\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff09\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 html \u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3057\u3087\u3046\u3002 <kbd>html:5<\/kbd> \u3068\u5165\u529b\u3057\u3001<strong>Tab<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335198\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/html_live_template.gif\" alt=\"\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b\" width=\"893\" height=\"359\" \/><\/figure>\n<\/div>\n<p>html \u30da\u30fc\u30b8\u306e\u8868\u793a\u30b3\u30f3\u30c6\u30f3\u30c4\u306f <code>&lt;body&gt;&lt;\/body&gt;<\/code> \u30bf\u30b0\u306b\u56f2\u307e\u308c\u305f\u90e8\u5206\u3067\u3059\u3002\u00a0<\/p>\n<p>\u305d\u306e\u90e8\u5206\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;h1&gt;Temperature at your location:&lt;\/h1&gt;\n&lt;h2&gt;{{ temp }} &amp;#8451;&lt;\/h2&gt;<\/pre>\n<p>\u3053\u3053\u3067\u3001<code>temp<\/code> \u306f\u30d3\u30e5\u30fc\u304b\u3089\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u6e21\u3055\u308c\u308b\u5909\u6570\u3067\u3059\u3002 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8868\u793a\u3059\u308b\u3068\u3001\u5909\u6570\u306e\u540d\u524d\u3068\u5024\u304c\u30c7\u30a3\u30af\u30b7\u30e7\u30ca\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066\u6e21\u3055\u308c\u307e\u3059\u3002 \u3053\u306e\u51e6\u7406\u306f <code>{\u2018temp\u2019 : temp}<\/code> \u3092\u4e0a\u8a18\u306e <strong>views.py <\/strong>\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u5909\u6570\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u3067\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u00a0<\/p>\n<p>\u6442\u6c0f\u8a18\u53f7\u306e Unicode \u8868\u8a18\u306f <code>&amp;#8451<\/code> \u3067\u3059\u3002 \u83ef\u6c0f\u306e\u5834\u5408\u306f <code>&amp;#8457<\/code> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u00a0<\/p>\n<p>\u3067\u306f\u3001\u5909\u66f4\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u3066\u30a2\u30d7\u30ea\u304c\u671f\u5f85\u3069\u304a\u308a\u306b\u52d5\u4f5c\u3059\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001Django \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002 \u524d\u8ff0\u306e\u3088\u3046\u306b\u5b9f\u884c\u69cb\u6210\u3092\u7de8\u96c6\u3057\u305f\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u81ea\u52d5\u7684\u306b\u958b\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335209\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-50.png\" alt=\"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u751f\u6210\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30da\u30fc\u30b8\" width=\"448\" height=\"178\" \/><\/figure>\n<\/div>\n<h2>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>API \u304b\u3089\u30e9\u30f3\u30c0\u30e0\u306a\u5834\u6240\u306e\u6c17\u6e29\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u5834\u6240\u306e\u5ea7\u6a19\u3092\u63d0\u4f9b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306b\u306f <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\" target=\"_blank\" rel=\"noreferrer noopener\">CC BY 4.0<\/a> \u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b <a href=\"https:\/\/www.kaggle.com\/juanmah\" target=\"_blank\" rel=\"noreferrer noopener\">Juanma Hern\u00e1ndez<\/a> \u306e <a href=\"https:\/\/www.kaggle.com\/datasets\/juanmah\/world-cities\" target=\"_blank\" rel=\"noopener\">World cities <\/a><a href=\"https:\/\/www.kaggle.com\/datasets\/juanmah\/world-cities\" target=\"_blank\" rel=\"noreferrer noopener\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/a>\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u304b\u3089 <strong>worldcities.csv<\/strong> \u3092\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002 <a href=\"https:\/\/www.kaggle.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Kaggle<\/a> \u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u304a\u6301\u3061\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u767b\u9332\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001Django \u304c\u81ea\u52d5\u751f\u6210\u3057\u305f <strong>db.sqlite3<\/strong> \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092 PyCharm \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u53f3\u5074\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066 <strong>Database<\/strong>\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u304d\u307e\u3059\u3002 <strong>\u2318E<\/strong> \/<strong> Ctrl+E<\/strong> \u3092\u62bc\u3059\u3068\u3001\u3059\u3079\u3066\u306e\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335243\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/open_database_tool_window.png\" alt=\"Database\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\" width=\"500\" height=\"392\" \/><\/figure>\n<\/div>\n<ol start=\"2\">\n<li>\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u5de6\u4e0a\u306b\u3042\u308b <strong>+<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>Data Source\uff08\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\uff09&gt; SQLite<\/strong> \u3092\u9078\u629e\u3057\u307e\u3059\u3002 <kbd>'sq\u2026'<\/kbd> \u3068\u5165\u529b\u3059\u308b\u3068\u3001\u5fc5\u8981\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u7d20\u65e9\u304f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335257\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/create_sql_source.png\" alt=\"SQL Lite \u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\" width=\"509\" height=\"327\" \/><\/figure>\n<\/div>\n<ol start=\"3\">\n<li><strong>File<\/strong>\uff08\u30d5\u30a1\u30a4\u30eb\uff09\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6a2a\u306b\u3042\u308b <strong>\u2026<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u30fc\u306e <strong>db.sqlite3<\/strong> \u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3057\u307e\u3059\u3002<\/li>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u66f4\u65b0\u3001\u307e\u305f\u306f\u5207\u308a\u66ff\u3048\u304c\u5fc5\u8981\u306a\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e0b\u306b\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u306f\u3001\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u5fc5\u8981\u306a\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335270\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-51.png\" alt=\"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff08\u5207\u308a\u66ff\u3048\u308b\uff09\" width=\"800\" height=\"676\" \/><\/figure>\n<\/div>\n<ol start=\"5\">\n<li><strong>OK<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u30c7\u30fc\u30bf\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u306b\u306f\u3001<strong>worldcities.csv<\/strong> \u3092 <strong>Database<\/strong>\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306e <strong>db.sqlite3<\/strong> \u306b\u30c9\u30e9\u30c3\u30b0\u30a2\u30f3\u30c9\u30ed\u30c3\u30d7\u3057\u307e\u3059\u3002 \u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u958b\u3044\u305f\u3089\u3001<strong>city\u3001lat\u3001lng\u3001country<\/strong>\u3001\u304a\u3088\u3073 <strong>id<\/strong> \u4ee5\u5916\u306e\u4e0d\u8981\u306a\u5217\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/dnd_csv_to_db.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p><strong>db.sqlite3<\/strong> \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b <strong>worldcities<\/strong> \u30c6\u30fc\u30d6\u30eb\u304c\u542b\u307e\u308c\u307e\u3057\u305f\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335292\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/worldcities_table_in_db.png\" alt=\"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u69cb\u9020\u306e Worldcities \u30c6\u30fc\u30d6\u30eb\" width=\"457\" height=\"180\" \/><\/figure>\n<\/div>\n<p>\u305d\u308c\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u4e2d\u8eab\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Django \u306f\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u64cd\u4f5c\u3057\u307e\u3059\u3002 \u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u3066 <strong>worldcities<\/strong> \u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ol>\n<li><strong>\u2325R<\/strong> \/ <strong>Ctrl+Alt+R<\/strong> \u3092\u62bc\u3057\u3066 <strong>manage.py<\/strong> \u30bf\u30b9\u30af\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u00a0<\/li>\n<li><kbd>inspectdb worldcities<\/kbd> \u3068\u5165\u529b\u3057\u3001<strong>Enter<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002<\/li>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\u306e <code>Worldcities<\/code> \u3092 <strong>meteo\\models.py<\/strong> \u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/li>\n<li>id \u30d5\u30a3\u30fc\u30eb\u30c9\u306e <code>null=True<\/code> \u3092 <code>primary_key=True<\/code> \u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"9\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from django.db import models\n\n\nclass Worldcities(models.Model):\n    city = models.TextField(blank=True, null=True)\n    lat = models.FloatField(blank=True, null=True)\n    lng = models.FloatField(blank=True, null=True)\n    country = models.TextField(blank=True, null=True)\n    id = models.IntegerField(blank=True, primary_key=True)\n\n    class Meta:\n        managed = False\n        db_table = 'worldcities'<\/pre>\n<h2>\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p>\u4eca\u306e\u3068\u3053\u308d\u3001<strong>views.py<\/strong> \u306b\u306f\u73fe\u5728\u5730\u306e\u73fe\u5728\u306e\u6c17\u6e29\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u8fd4\u3059\u95a2\u6570\uff08<code>temp_here<\/code>\uff09\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002 \u95a2\u6570\u3092\u3082\u3046 1 \u3064\u8ffd\u52a0\u3057\u3066\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u5834\u6240\u306e\u6c17\u6e29\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002 API \u304b\u3089\u73fe\u5728\u306e\u6c17\u6e29\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001Python \u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u5f93\u3063\u3066\u8a72\u5f53\u3059\u308b\u6a5f\u80fd\u3092\u5225\u306e\u95a2\u6570\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>PyCharm \u3067\u306f\u3001\u3053\u306e\u3088\u3046\u306a\u79fb\u52d5\u3092 <strong>Extract method<\/strong>\uff08\u30e1\u30bd\u30c3\u30c9\u306e\u62bd\u51fa\uff09\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5225\u306e\u95a2\u6570\u306b\u79fb\u52d5\u3059\u308b\u5fc5\u8981\u306e\u3042\u308b\u884c\u3092\u9078\u629e\u3057\u3001<strong>\u2325\u2318M<\/strong> \/ <strong>Ctrl+Alt+M<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002 \u307e\u305f\u306f\u3001<strong>Find Action<\/strong>\uff08\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u691c\u7d22\uff09\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/extract_method.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p><strong>Method name<\/strong>\uff08\u30e1\u30bd\u30c3\u30c9\u540d\uff09\u30d5\u30a3\u30fc\u30eb\u30c9\u306b <code>get_temp<\/code> \u3092\u5165\u529b\u3057\u3066 <strong>OK<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002 <code>location<\/code> \u3092\u552f\u4e00\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3059\u308b <code>get_temp<\/code> \u95a2\u6570\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><code>get_temp<\/code> \u95a2\u6570\u547c\u3073\u51fa\u3057\u306b\u3088\u308a\u3001\u73fe\u5728\u306e\u5834\u6240\u306e\u6c17\u6e29\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335315\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/after_extract_method.png\" alt=\"Extract Method\uff08\u30e1\u30bd\u30c3\u30c9\u306e\u62bd\u51fa\uff09\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u306e\u7d50\u679c\" width=\"892\" height=\"528\" \/><\/figure>\n<\/div>\n<p><code>temp_somewhere<\/code> \u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002 \u3053\u306e\u95a2\u6570\u306f\u30e9\u30f3\u30c0\u30e0\u306a\u90fd\u5e02\u306e\u5ea7\u6a19\u3092 <code>get_temp<\/code> \u306b\u6e21\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001Python \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002 \u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\uff08<code>ImportError<\/code> \u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306f\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u9589\u3058\u3066\u958b\u304d\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from meteo.models import Worldcities\nrandom_item = Worldcities.objects.all().order_by('?').first()<\/pre>\n<p><strong>worldcities<\/strong> \u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306f\u30e2\u30c7\u30eb\u3092\u4f7f\u3063\u3066\u884c\u3046\u305f\u3081\u3001<strong>models.py<\/strong> \u304b\u3089 <code>Worldcities<\/code> \u30e2\u30c7\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u3059\u3079\u3066\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 <code>order_by(\u2018?\u2019)<\/code> \u3067\u30e9\u30f3\u30c0\u30e0\u5316\u3057\u3001<code>first()<\/code> \u3067\u6700\u521d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 <strong>Python console<\/strong>\uff08Python \u30b3\u30f3\u30bd\u30fc\u30eb\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u53f3\u5074\u306b <strong>Variables<\/strong>\uff08\u5909\u6570\uff09\u30bf\u30d6\u304c\u3042\u308a\u307e\u3059\u3002 <strong>random_item<\/strong> \u30ce\u30fc\u30c9\u3092\u5c55\u958b\u3057\u3001<strong>random_item<\/strong> \u306e\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335326\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/manual_request_2.png\" alt=\"Python \u30b3\u30f3\u30bd\u30fc\u30eb\u306e Variables\uff08\u5909\u6570\uff09\u30bf\u30d6\u3067\u5909\u6570\u3092\u691c\u67fb\u3059\u308b\" width=\"800\" height=\"266\" \/><\/figure>\n<\/div>\n<p><code>temp_somewhere<\/code> \u95a2\u6570\u306e\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def temp_somewhere(request):\n    random_item = Worldcities.objects.all().order_by('?').first()\n    city = random_item.city\n    location = [random_item.lat, random_item.lng]\n    temp = get_temp(location)\n    template = loader.get_template(\"index.html\")\n    context = {\n        'city': city,\n        'temp': temp\n    }\n    return HttpResponse(template.render(context, request))<\/pre>\n<p><code>context<\/code> \u306b\u6c17\u6e29\u3060\u3051\u3067\u306a\u304f\u90fd\u5e02\u540d\u3082\u542b\u307e\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u7de8\u96c6\u3057\u3001\u3053\u306e\u60c5\u5831\u3082\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>&lt;&gt;<\/strong> \u30a2\u30a4\u30b3\u30f3\u304c\u30ac\u30bf\u30fc\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306b\u6c17\u4ed8\u304d\u307e\u3057\u305f\u304b\uff1f \u3053\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001<strong>index.html<\/strong> \u306b\u7d20\u65e9\u304f\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335337\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/gutter_icon.png\" alt=\"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u7d20\u65e9\u304f\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u30ac\u30bf\u30fc\u30a2\u30a4\u30b3\u30f3\" width=\"613\" height=\"277\" \/><\/figure>\n<\/div>\n<p><code>&lt;h1&gt;&lt;\/h1&gt;<\/code> \u30bf\u30b0\u306b\u56f2\u307e\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u3092 <code>{{ city }}<\/code> \u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335348\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/replace_h1.png\" alt=\"\u898b\u51fa\u3057\u3092\u5909\u6570\u306b\u7f6e\u304d\u63db\u3048\u308b\" width=\"674\" height=\"400\" \/><\/figure>\n<\/div>\n<p>\u30ac\u30bf\u30fc\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001<code>temp_here<\/code> \u95a2\u6570\u306b\u7d20\u65e9\u304f\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335359\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/gutter_icon_2.png\" alt=\"Python \u30d5\u30a1\u30a4\u30eb\u306b\u7d20\u65e9\u304f\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u30ac\u30bf\u30fc\u30a2\u30a4\u30b3\u30f3\" width=\"670\" height=\"332\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u95a2\u6570\u3092 <code>city<\/code> \u5909\u6570\u3082\u6e21\u3059\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335370\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/modified_temp_here.png\" alt=\"temp_here \u95a2\u6570\u3092\u66f4\u65b0\u3059\u308b\" width=\"604\" height=\"225\" \/><\/figure>\n<\/div>\n<p><code>temp_here<\/code> \u95a2\u6570\u306f\u3001<kbd>https:\/\/127.0.0.1\/meteo<\/kbd> \u30da\u30fc\u30b8\u304c\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u958b\u304b\u308c\u305f\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306f <strong>meteo\/urls.py<\/strong> \u3067\u69cb\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u306b\u623b\u308a\u3001<kbd>https:\/\/127.0.0.1\/meteo\/discover<\/kbd> \u306b\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u3068\u304d\u306b <code>temp_somewhere<\/code> \u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"3\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">urlpatterns = [\n    path('meteo\/', views.temp_here, name='temp_here'),\n    path('meteo\/discover', views.temp_somewhere, name='temp_somewhere'),\n]<\/pre>\n<p><strong>index.html<\/strong> \u306b\u623b\u308a\u3001<strong>\/discover<\/strong> \u30da\u30fc\u30b8\u3068\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306f\u3001\u5fc5\u305a\u73fe\u5728\u306e\u5834\u6240\u306e\u6c17\u6e29\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u4f5c\u696d\u306b\u304b\u304b\u308b\u6642\u9593\u3092\u77ed\u7e2e\u3059\u308b\u306b\u306f\u3001\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u30b3\u30fc\u30c9\u88dc\u5b8c\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/completion_add_links_to_template.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>HTML \u30d5\u30a1\u30a4\u30eb\u306e\u6bb5\u843d\u3068\u30ea\u30f3\u30af\u306b\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u305d\u308c\u305e\u308c <kbd>'p'<\/kbd> \u3068 <kbd>'a'<\/kbd> \u3092\u5165\u529b\u3057\u3066 <strong>Tab<\/strong> \u3092\u62bc\u3059\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u4f7f\u7528\u3067\u304d\u308b\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u5168\u30ea\u30b9\u30c8\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u8a2d\u5b9a\u3092\u958b\u304d\uff08<strong>\u2318<\/strong> \/ <strong>Ctrl+Alt+S<\/strong>\uff09\u3001<strong>Editor\uff08\u30a8\u30c7\u30a3\u30bf\u30fc\uff09&gt; Live Templates\uff08\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff09<\/strong>\u306b\u79fb\u52d5\u3057\u3001\u53f3\u30da\u30a4\u30f3\u306e <strong>Zen HTML<\/strong> \u30ce\u30fc\u30c9\u3092\u5c55\u958b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335392\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/live_templates_settings.png\" alt=\"\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u8a2d\u5b9a\u3092\u69cb\u6210\u3059\u308b\" width=\"800\" height=\"584\" \/><\/figure>\n<\/div>\n<p>\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u5b9f\u884c\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u64cd\u4f5c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335403\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/play_with_links.gif\" alt=\"\" width=\"351\" height=\"205\" \/><\/figure>\n<\/div>\n<h1>\u3053\u308c\u3067\u7d42\u308f\u308a\u3067\u306f\u3042\u308a\u307e\u305b\u3093<\/h1>\n<p>\u30a2\u30d7\u30ea\u306f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u307e\u3060\u307e\u3060\u6539\u5584\u306e\u4f59\u5730\u304c\u3042\u308a\u307e\u3059\u3002 \u6700\u3082\u660e\u3089\u304b\u306a\u306e\u306f\u8996\u899a\u7684\u306a\u5916\u89b3\u3067\u3059\u304c\u3001\u4ed6\u306e\u6a5f\u80fd\u3082\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>CSS \u3092\u4f7f\u7528\u3059\u308b<\/h2>\n<p>Django \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u898b\u6804\u3048\u3092\u7d20\u65e9\u304f\u7c21\u5358\u306b\u6539\u5584\u3059\u308b\u306b\u306f\u3001CSS \u3092\u4f7f\u7528\u3059\u308b\u306e\u304c\u4e00\u756a\u3067\u3059\u3002 \u305f\u3068\u3048\u3070\u3001<a href=\"https:\/\/simplecss.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Simple.CSS<\/a> \u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>index.html<\/strong> \u306e <code>&lt;head&gt;&lt;\/head&gt;<\/code> \u30bf\u30b0\u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u633f\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.simplecss.org\/simple.min.css\"&gt;<\/pre>\n<p>\u5916\u89b3\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335414\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-52.png\" alt=\"CSS \u3092\u9069\u7528\u3059\u308b\" width=\"296\" height=\"333\" \/><\/figure>\n<\/div>\n<p>\u30ea\u30f3\u30af\u3092\u30dc\u30bf\u30f3\u306b\u7f6e\u304d\u63db\u3048\u3066\u3082\u5916\u89b3\u304c\u6539\u5584\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335425\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/image-53.png\" alt=\"\u30ea\u30f3\u30af\u3092\u30dc\u30bf\u30f3\u306b\u7f6e\u304d\u63db\u3048\u308b\" width=\"319\" height=\"347\" \/><\/figure>\n<\/div>\n<p>\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001<strong>index.html<\/strong> \u306e <code>&lt;p&gt;&lt;\/p&gt;<\/code> \u30bf\u30b0\u306e\u4e2d\u306b\u3042\u308b\u30ea\u30f3\u30af\u3092\u4ee5\u4e0b\u306e HTML \u30b3\u30fc\u30c9\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;div style=\"display: flex;\"&gt;\n    &lt;form action=\".\/discover\"&gt;\n        &lt;input type=\"submit\" value=\"Check other places\"\/&gt;\n    &lt;\/form&gt;\n    &amp;nbsp;\n    &lt;form action=\".\"&gt;\n        &lt;input style=\"background: #dc3545\" type=\"submit\" value=\"Home\"\/&gt;\n    &lt;\/form&gt;\n&lt;\/div&gt;<\/pre>\n<p><strong>index.html<\/strong> \u306e\u7de8\u96c6\u7d50\u679c\u306f PyCharm \u304b\u3089\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5207\u308a\u66ff\u3048\u306a\u304f\u3066\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 \u30a8\u30c7\u30a3\u30bf\u30fc\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u53f3\u4e0a\u306b\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u79fb\u52d5\u3057\u3001<strong>Built-in Preview<\/strong>\uff08\u30d3\u30eb\u30c8\u30a4\u30f3\u30d7\u30ec\u30d3\u30e5\u30fc\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/built_in_preview.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<h2>Bootstrap \u3092\u4f7f\u7528\u3059\u308b<\/h2>\n<p><a href=\"https:\/\/getbootstrap.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bootstrap<\/a> \u306f\u5f37\u529b\u306a\u7121\u6599\u306e\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8\u3067\u3059\u3002 \u3053\u308c\u3092\u7d20\u65e9\u304f Django \u30a2\u30d7\u30ea\u306b\u9069\u7528\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b <strong>index.html <\/strong> \u3092\u7de8\u96c6\u3057\u307e\u3059\uff08\u8a73\u7d30\u306f <a href=\"https:\/\/getbootstrap.com\/docs\/5.3\/getting-started\/introduction\/#quick-start\" target=\"_blank\" rel=\"noreferrer noopener\">Bootstrap \u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u30ac\u30a4\u30c9<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\uff09\u3002<\/p>\n<ol>\n<li>HTML \u306e head \u306b <code>link<\/code> \u30bf\u30b0\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff08\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u306e simple.css \u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\uff09\u3002<\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3\/Jr59b6EGGoI1aFkw7cmDA6j6gD\" crossorigin=\"anonymous\"&gt;<\/pre>\n<p>2. \u3053\u306e\u30b3\u30fc\u30c9\u3068\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092 <code>&lt;body&gt;&lt;\/body&gt;<\/code> \u30bf\u30b0\u306e\u4e2d\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;div class=\"container text-center\"&gt;\n    &lt;h1&gt;{{ city }}&lt;\/h1&gt;\n    &lt;h2&gt;{{ temp }} &amp;#8451;&lt;\/h2&gt;\n    &lt;div class=\"btn-group\" role=\"group\"&gt;\n        &lt;button type=\"button\" class=\"btn btn-outline-primary\" onclick=\"location.href='.\/discover'\"&gt;Check other places\n        &lt;\/button&gt;\n        &lt;button type=\"button\" class=\"btn btn-danger\" onclick=\"location.href='.'\"&gt;Home&lt;\/button&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;<\/pre>\n<p>\u7d50\u679c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335471\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/bootstrap.gif\" alt=\"\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067 Bootstrap \u3092\u4f7f\u7528\u3059\u308b\" width=\"300\" height=\"178\" \/><\/figure>\n<\/div>\n<p>Bootstrap \u306b\u306f\u30a2\u30d7\u30ea\u306e\u5916\u89b3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u304c\u8c4a\u5bcc\u306b\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u3002 \u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u60c5\u5831\u306f\u3001<a href=\"https:\/\/getbootstrap.com\/docs\/5.3\/getting-started\/introduction\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b9\u30ad\u30eb\u30c1\u30a7\u30c3\u30af<\/h2>\n<p><strong>worldcities<\/strong> \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e <code>country<\/code> \u30d5\u30a3\u30fc\u30eb\u30c9\u3092 <code>Worldcities<\/code> \u30e2\u30c7\u30eb\u306b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u304c\u3001\u30a2\u30d7\u30ea\u306e\u3069\u306e\u5834\u6240\u306b\u3082\u305d\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u305d\u3053\u3067\u3001\u529b\u8a66\u3057\u3092\u3057\u307e\u3057\u3087\u3046\u3002\u30a2\u30d7\u30ea\u306b\u90fd\u5e02\u540d\u3060\u3051\u3067\u306a\u304f\u56fd\u3082\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-335482\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/03\/check_yourself.gif\" alt=\"\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u56fd\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b\" width=\"262\" height=\"286\" \/><\/figure>\n<\/div>\n<h1>\u307e\u3068\u3081<\/h1>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u4ee5\u4e0b\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>PyCharm \u3067 Django \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/li>\n<li>\u30d3\u30e5\u30fc\u3092\u8a18\u8ff0\u3057\u3066\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/li>\n<li>API \u3092\u547c\u3073\u51fa\u3057\u3066\u5fdc\u7b54\u3092\u51e6\u7406\u3059\u308b\u3002<\/li>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u63a5\u7d9a\u3057\u3066\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3002<\/li>\n<li>CSS \u3068 Bootstrap \u3092\u9069\u7528\u3057\u3066\u30a2\u30d7\u30ea\u306e\u8996\u899a\u7684\u306a\u5916\u89b3\u3092\u6539\u5584\u3059\u308b\u3002<\/li>\n<\/ul>\n<p><strong>\u30aa\u30ea\u30b8\u30ca\u30eb\uff08\u82f1\u8a9e\uff09\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u4f5c\u8005\uff1a<\/strong><\/p>\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1394,"featured_media":346303,"comment_status":"closed","ping_status":"closed","template":"","categories":[2347],"tags":[],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/346289"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/types\/pycharm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/users\/1394"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/comments?post=346289"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/346289\/revisions"}],"predecessor-version":[{"id":346351,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/346289\/revisions\/346351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media\/346303"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media?parent=346289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/categories?post=346289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/tags?post=346289"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/cross-post-tag?post=346289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}