{"id":29516,"date":"2017-08-13T23:39:50","date_gmt":"2017-08-13T14:39:50","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=29516"},"modified":"2024-05-06T11:44:25","modified_gmt":"2024-05-06T02:44:25","slug":"%e3%80%90django%e5%85%a5%e9%96%80%e3%80%91%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%95%e3%82%8c%e3%81%9ftest%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/29516","title":{"rendered":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002ryo\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001Django\u3067\u4f5c\u3063\u305f<strong>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c6\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac<\/strong>\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3068\u306f<\/b><\/li>\n<li><b>Python\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308bunittest\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001<\/p>\n<ul>\n<li><b>Selenium\u3092\u4f7f\u3063\u305f\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c\u306e\u81ea\u52d5\u5316<\/b><\/li>\n<\/ul>\n<p>\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac\u3092\u901a\u3057\u3066\u3001\u4eca\u306e\u30c6\u30b9\u30c8\u306e\u6d41\u884c\u308a\u3067\u3042\u308bSelenium\u306b\u3064\u3044\u3066\u3082\u77e5\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3068\u306f<\/h2>\n<p>\u3053\u308c\u304b\u3089\u5b66\u7fd2\u3059\u308bWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3068\u306f\u3001\u4e00\u4f53\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u3002\u666e\u6bb5\u4f7f\u3063\u3066\u3044\u308bGoogle\u3084Yahoo\u3001Amazon\u306a\u3069\u306e<strong>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u3068\u3066\u3082\u591a\u304f\u306e\u6a5f\u80fd<\/strong>\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u3089\u306e\u6a5f\u80fd\u304c\u3057\u3063\u304b\u308a\u3068\u671f\u5f85\u3059\u308b\u52d5\u4f5c\u3092\u3057\u3066\u304f\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u8abf\u3079\u308b\u306e\u304c\u30c6\u30b9\u30c8\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u4ee5\u5916\u306b\u3082<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>\u6027\u80fd\u30c6\u30b9\u30c8\uff08\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u307e\u3067\u306b\u6642\u9593\u304c\u639b\u304b\u308a\u904e\u304e\u3066\u3044\u306a\u3044\u304b\u3002\uff09<\/b><\/li>\n<li><b>\u8ca0\u8377\u30c6\u30b9\u30c8\uff08\u30a2\u30af\u30bb\u30b9\u304c\u898b\u8fbc\u3081\u308b\u30b5\u30a4\u30c8\u3067\u3069\u306e\u7a0b\u5ea6\u306e\u8ca0\u8377\u307e\u3067\u8010\u3048\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u306e\u304b\u3002\uff09<\/b><\/li>\n<li><b>UI\u30fbUX\u30c6\u30b9\u30c8\uff08\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u30fb\u30e6\u30fc\u30b6\u30fc\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u304c\u30b5\u30a4\u30c8\u306e\u65b9\u91dd\u306b\u5408\u3063\u3066\u3044\u308b\u304b\u3002\uff09<\/b><\/li>\n<li><b>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30c6\u30b9\u30c8\uff08\u60aa\u8cea\u306a\u653b\u6483\u306b\u5099\u3048\u3066\u8106\u5f31\u6027\u3092\u4fee\u6b63\u3002\uff09<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u306a\u3069\u3001\u69d8\u3005\u306a\u30c6\u30b9\u30c8\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u9805\u76ee\u306b\u3064\u3044\u3066\u305d\u308c\u305e\u308c\u624b\u52d5\u3067\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3044\u304f\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u5927\u898f\u6a21\u306a\u30b5\u30a4\u30c8\u3067\u306f\u305d\u308c\u305e\u308c\u306e\u30c6\u30b9\u30c8\u306b\u5bfe\u3059\u308b\u9805\u76ee\u304c\u591a\u3059\u304e\u3066\u3001\u6642\u9593\u3082\u52b4\u529b\u3082\u9014\u65b9\u304c\u7121\u3044\u3082\u306e\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u30c4\u30fc\u30eb\u3082\u51fa\u3066\u304d\u307e\u3057\u305f\u3002Python\u306b\u306funittest\u3068\u3044\u3046\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u30c4\u30fc\u30eb\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u306funittest\u3092\u4f7f\u3063\u3066\u3001Django\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>unittest\u3092\u4f7f\u3063\u305f\u30c6\u30b9\u30c8\u306e\u5b9f\u884c<\/h2>\n<p>\u3053\u3053\u304b\u3089\u306f\u5b9f\u969b\u306bWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002\u3053\u3053\u304b\u3089\u52d5\u4f5c\u3055\u305b\u308b\u30b3\u30fc\u30c9\u3084\u30b3\u30de\u30f3\u30c9\u306f\u3059\u3079\u3066Mac\u3067\u5b9f\u884c\u3057\u305f\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002Windows\u3084Linux\u3067\u52d5\u304b\u3059\u5834\u5408\u306f\u3001\u30b3\u30de\u30f3\u30c9\u3092\u7f6e\u304d\u63db\u3048\u3066\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u306e\u8a18\u4e8b\u3067\u4f7f\u3063\u305fPython\u306e\u74b0\u5883\u306f\u3001<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>Python\u30003.6.0<\/b><\/li>\n<li><b>Django\u30001.11.2<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u3082\u3057\u3082\u4e0a\u624b\u304f\u884c\u304b\u306a\u304b\u3063\u305f\u3089\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5408\u308f\u305b\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h3>Django\u306e\u4e0b\u6e96\u5099<\/h3>\n<p>\u307e\u305a\u306fDjango\u306e\u74b0\u5883\u3092\u6574\u3048\u307e\u3057\u3087\u3046\u3002Django\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u4e2d\u306bWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u57fa\u672c\u306e\u6d41\u308c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305a\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308a\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:python decode:true \">django-admin startproject mySite<\/pre>\n<p>\u3053\u308c\u3067<strong>mySite\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3059<\/strong>\u3002\u6b21\u306bmySite\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:python decode:true \">python manage.py startapp myapp<\/pre>\n<p>\u3053\u308c\u3067mySite\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4e2d\u306b\u3001<strong>myapp\u3068\u3044\u3046Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f<\/strong>\u3002\u73fe\u5728\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">mySite\r\n\u251c\u2500\u2500 manage.py\r\n\u251c\u2500\u2500 mySite\r\n\u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u251c\u2500\u2500 __pycache__\r\n\u2502   \u2502   \u251c\u2500\u2500 __init__.cpython-36.pyc\r\n\u2502   \u2502   \u2514\u2500\u2500 settings.cpython-36.pyc\r\n\u2502   \u251c\u2500\u2500 settings.py\r\n\u2502   \u251c\u2500\u2500 urls.py\r\n\u2502   \u2514\u2500\u2500 wsgi.py\r\n\u2514\u2500\u2500 myapp\r\n    \u251c\u2500\u2500 __init__.py\r\n    \u251c\u2500\u2500 admin.py\r\n    \u251c\u2500\u2500 apps.py\r\n    \u251c\u2500\u2500 migrations\r\n    \u2502   \u2514\u2500\u2500 __init__.py\r\n    \u251c\u2500\u2500 models.py\r\n    \u251c\u2500\u2500 tests.py\r\n    \u2514\u2500\u2500 views.py\r\n\r\n4 directories, 14 files<\/pre>\n<p>\u6b21\u306b\u3001mySite\/settings.py\u306eINSTALLED_APPS\u3092\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">INSTALLED_APPS = [\r\n    'django.contrib.admin',\r\n    'django.contrib.auth',\r\n    'django.contrib.contenttypes',\r\n    'django.contrib.sessions',\r\n    'django.contrib.messages',\r\n    'django.contrib.staticfiles',\r\n    'myapp',\r\n]<\/pre>\n<p>INSTALLED_APPS\u306b\u3001myapp\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3067Django\u306e\u4e0b\u6e96\u5099\u306f\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306bmyapp\/models.py\u3092\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.db import models\r\n\r\nclass Person(models.Model):\r\n    pass<\/pre>\n<p>models\u306bPerson\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u6b21\u306b\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">python manage.py makemigrations myapp<\/pre>\n<p>\u7d9a\u3044\u3066\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">python manage.py migrate<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3001models\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/27387\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/10\/image-36-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Django\u5165\u9580\u3011Django\u30a2\u30d7\u30ea\u306e\u8a2d\u8a08\u54f2\u5b66\uff01MTV\u30e2\u30c7\u30eb\u3092models\u3092\u901a\u3057\u3066\u5b66\u307c\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h3>unittest\u3092\u4f5c\u308b<\/h3>\n<p>Django\u306e\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3067\u306fPython\u4ed8\u5c5e\u306eunittest\u3092\u62e1\u5f35\u3057\u305fDjango\u72ec\u81ea\u306eTestCase\u30af\u30e9\u30b9\u3092\u4f7f\u3044\u307e\u3059\u3002\u57fa\u672c\u7684\u306a\u6d41\u308c\u3068\u3057\u3066\u306f<strong>django.test\u3092import\u3057\u3066TestCase\u3092\u7d99\u627f\u3057\u3066\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9<\/strong>\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>myapp\/tests.py\u3092\u7de8\u96c6\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3053\u3068\u3067\u3001\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u4eca\u56de\u306f\u5148\u7a0b\u4f5c\u3063\u305fPerson\u306emodels\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u6570\u3092\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.test import TestCase\r\nfrom myapp.models import Person\r\n\r\nclass PersonModelTests(TestCase):\r\n    def test_is_empty(self):\r\n        saved_persons = Person.objects.all()\r\n        self.assertEqual(saved_persons.count(), 0)<\/pre>\n<p>\u6b21\u306b\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:python decode:true \">python manage.py test<\/pre>\n<p>\u7d50\u679c\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Creating test database for alias 'default'...\r\nSystem check identified no issues (0 silenced).\r\n.\r\n----------------------------------------------------------------------\r\nRan 1 test in 0.001s\r\n\r\nOK\r\nDestroying test database for alias 'default'...<\/pre>\n<p>\u3053\u308c\u3067\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u304c\u5b9f\u884c\u3067\u304d\u307e\u3057\u305f\u3002\u3053\u3053\u307e\u3067\u306e\u3053\u3068\u3092\u632f\u308a\u8fd4\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002myapp\/tests.py\u306b\u66f8\u3044\u305fself.assertEqual\u95a2\u6570\u306e\u7b2c\u4e8c\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305f\u6570\u3068\u3001\u30ec\u30b3\u30fc\u30c9\u306e\u6570\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u3060\u30ec\u30b3\u30fc\u30c9\u306b\u306f\u4f55\u3082\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3057\u3066\u7b2c\u4e8c\u5f15\u6570\u3068\u30ec\u30b3\u30fc\u30c9\u306b\u8ffd\u52a0\u3055\u308c\u305f\u6570\u304c\u540c\u3058\u306a\u306e\u3067\u3001\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u306b\u300cOK\u300d\u8fd4\u3063\u3066\u304d\u305f\u3053\u3068\u304c\u5206\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306bmyapp\/tests.py\u306b\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3001\u305d\u308c\u305e\u308c\u306emodels\u306b\u5bfe\u3057\u3066\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\uff08\u30af\u30e9\u30b9\uff09\u306f\u3044\u304f\u3064\u8ffd\u52a0\u3057\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u304c\u3001TestCase\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u306e\u6570\u304c\u591a\u304f\u306a\u3063\u3066\u304f\u308b\u5834\u5408\u306fmyapp\/tests\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u5206\u3051\u3066\u66f8\u304f\u3053\u3068\u3067\u7ba1\u7406\u304c\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u4e00\u6b69\u9032\u3093\u3060\u30c6\u30b9\u30c8\u306e\u65b9\u6cd5<\/h2>\n<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u306funittest\u3092\u4f7f\u3063\u305f\u65b9\u6cd5\u3060\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u4ee3\u8868\u7684\u306a\u30c4\u30fc\u30eb\u3068\u3057\u3066Selenium\u304c\u3042\u308a\u307e\u3059\u3002<strong>Selenium\u306f\u81ea\u52d5\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fSelenium\u304c\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u306a\u306e\u304b\u3092\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>Selenium\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>Selenium\u306fPython\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3067\u3042\u308bpip\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre class=\"lang:bash decode:true \">pip install selenium<\/pre>\n<p>\u307e\u305f\u3001\u5404\u30d6\u30e9\u30a6\u30b6\u5411\u3051\u306b\u914d\u5e03\u3057\u3066\u3044\u308b\u30c9\u30e9\u30a4\u30d0\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4eca\u56de\u306fChrome\u3092\u60f3\u5b9a\u3057\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u30c9\u30e9\u30a4\u30d0\u306f<a href=\"https:\/\/sites.google.com\/a\/chromium.org\/chromedriver\/downloads\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3061\u3089<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Selenium\u3067\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316<\/h3>\n<p>\u3053\u3053\u304b\u3089\u306f\u5b9f\u969b\u306bSelenium\u3092\u4f7f\u3063\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u76f4\u63a5\u64cd\u4f5c\u305b\u305a\u306b www.sejuku.net \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u898b\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002python\u3092\u5b9f\u884c\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bchromedriver\u3092\u7f6e\u3044\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u3044\u3066Python\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u958b\u304d\u307e\u3057\u3087\u3046\u3002\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u30921\u884c\u3065\u3064\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001Python\u3067Chrome\u304c\u64cd\u4f5c\u51fa\u6765\u308b\u3053\u3068\u304c\u5206\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from selenium import webdriver\r\n\r\nbrowser = webdriver.Chrome(executable_path='.\/chromedriver')\r\n#Chrome\u304c\u958b\u304f\r\n\r\nbrowser.get('http:\/\/www.google.co.jp')\r\n#Google\u306b\u30a2\u30af\u30bb\u30b9\r\n\r\nt=browser.find_element_by_id('lst-ib')\r\nt.send_keys(u'www.sejuku.netn')\r\n#\u691c\u7d22\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u300cwww.sejuku.net\u300d\u3092\u5165\u529b\r\n\r\nb=browser.find_element_by_xpath('\/\/*[@id=\"rso\"]\/div\/div\/div[1]\/div\/div\/h3\/a')\r\nb.click()\r\n#\u691c\u7d22\u9806\u756a\u306e1\u756a\u4e0a\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af<\/pre>\n<p>\u7121\u4e8b\u306b www.sejuku.net \u306b\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u305f\u3067\u3057\u3087\u3046\u304b\u3002Selenium\u3067\u306fDOM\uff08Document Object Model\uff09\u3068\u547c\u3070\u308c\u308b\u30da\u30fc\u30b8\u306e\u69cb\u9020\u306b\u3064\u3044\u3066\u3092\u77e5\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>DOM\u3068\u306fHTML\u306a\u3069\u306e\u6587\u66f8\u306e\u305f\u3081\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u3053\u3068\u3067\u3059\u3002\u4e0a\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306b\u3042\u308b\u300ct=browser.find_element_by_id(&#8216;lst-ib&#8217;)\u300d\u3067\u306f\u3001ID\u3067lst-ib\u3068\u3044\u3046\u30a8\u30ec\u30e1\u30f3\u30c8\uff08\u8981\u7d20\uff09\u3092\u63a2\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fPython\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u4e00\u3064\u4e00\u3064\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092.py\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u3057\u3063\u304b\u308a\u3068\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u300c\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u300d\u3068\u3044\u3046\u610f\u5473\u304c\u3088\u304f\u308f\u304b\u3089\u306a\u304b\u3063\u305f\u65b9\u3082\u3001Selenium\u3092\u4f7f\u3063\u305f\u65b9\u6cd5\u3067\u306a\u3093\u3068\u306a\u304f\u306f\u7406\u89e3\u3057\u3066\u3044\u305f\u3060\u3051\u307e\u3057\u305f\u304b\uff1f<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Django\u3067\u4f5c\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002unittest\u306fPython\u306b\u6a19\u6e96\u3067\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u306e\u3067\u5185\u90e8\u7684\u306a\u6a5f\u80fd\u306b\u7279\u5316\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u591a\u304f\u306e\u8a00\u8a9e\u304b\u3089\u4f7f\u3048\u308bSelenium\u306f\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u52d5\u304d\u3092\u898b\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u3061\u3087\u3063\u3068\u3057\u305f\u6319\u52d5\u306e\u30c6\u30b9\u30c8\u304b\u3089\u5b9f\u969b\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u5b9f\u884c\u3059\u308b\u3068\u601d\u308f\u308c\u308b\u6319\u52d5\u307e\u3067\u3001\u5e45\u5e83\u304f\u30ab\u30d0\u30fc\u3067\u304d\u307e\u3059\u3002\u3044\u307e\u3044\u3061\u30a4\u30e1\u30fc\u30b8\u304c\u3064\u304b\u3081\u306a\u3044\u65b9\u306fSelenium\u3092\u4f7f\u3063\u3066\u307f\u3066\u3001\u8996\u899a\u7684\u306b\u30c6\u30b9\u30c8\u306b\u3064\u3044\u3066\u5b9f\u611f\u3057\u3066\u3044\u304f\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002ryo\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001Django\u3067\u4f5c\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c6\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001 Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3068\u306f Python\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308bunittest\u306e [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":29620,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2350],"tags":[471,49],"class_list":["post-29516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-study","tag-django","tag-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\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.sejuku.net\/blog\/29516\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/29516\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-13T14:39:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:44:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\",\"datePublished\":\"2017-08-13T14:39:50+00:00\",\"dateModified\":\"2024-05-06T02:44:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516\"},\"wordCount\":166,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image8.jpg\",\"keywords\":[\"Django\",\"python\"],\"articleSection\":[\"Python\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516\",\"name\":\"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image8.jpg\",\"datePublished\":\"2017-08-13T14:39:50+00:00\",\"dateModified\":\"2024-05-06T02:44:25+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image8.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image8.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/29516#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","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.sejuku.net\/blog\/29516","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/29516","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2017-08-13T14:39:50+00:00","article_modified_time":"2024-05-06T02:44:25+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/29516#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/29516"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046","datePublished":"2017-08-13T14:39:50+00:00","dateModified":"2024-05-06T02:44:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/29516"},"wordCount":166,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/29516#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg","keywords":["Django","python"],"articleSection":["Python\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/29516","url":"https:\/\/www.sejuku.net\/blog\/29516","name":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/29516#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/29516#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg","datePublished":"2017-08-13T14:39:50+00:00","dateModified":"2024-05-06T02:44:25+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/29516#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/29516"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/29516#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image8.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/29516#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Django\u5165\u9580\u3011\u81ea\u52d5\u5316\u3055\u308c\u305ftest\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/29516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=29516"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/29516\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/29620"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=29516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=29516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=29516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}