{"id":30742,"date":"2017-08-22T23:54:48","date_gmt":"2017-08-22T14:54:48","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=30742"},"modified":"2024-05-06T11:44:37","modified_gmt":"2024-05-06T02:44:37","slug":"%e3%80%90django%e5%85%a5%e9%96%80%e3%80%91%e3%83%95%e3%82%a9%e3%83%bc%e3%83%a0%e3%82%92%e4%bd%9c%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\/30742","title":{"rendered":"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002ryo\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f<span style=\"color: #339966\"><strong>Django<\/strong><\/span>\u3067<span style=\"color: #339966\"><strong>\u30d5\u30a9\u30fc\u30e0<\/strong><\/span>\u3092\u4f5c\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0\u306b\u306f\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u3082\u306e\u3084\u6570\u5b57\u3092\u5165\u529b\u3059\u308b\u3082\u306e\u306a\u3069\u3001\u69d8\u3005\u306a\u6587\u6cd5\u3092\u53d7\u3051\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fb\u30d5\u30a9\u30fc\u30e0\u3068\u306f\u4f55\u304b<br \/>\n\u30fbDjango\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u65b9\u6cd5<\/strong><\/span><\/p>\n<p>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fb\u3088\u304f\u4f7f\u308f\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9<\/strong><\/span><\/p>\n<p>\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac\u3092\u901a\u3057\u3066\u3001\u3088\u308a\u5b9f\u7528\u7684\u306a\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30d5\u30a9\u30fc\u30e0\u3068\u306f<\/h2>\n<p><span style=\"color: #339966\"><strong>\u30d5\u30a9\u30fc\u30e0<\/strong><\/span>\u3092\u4f5c\u308b\u524d\u306b\u307e\u305a\u306f\u30d5\u30a9\u30fc\u30e0\u3068\u306f\u4f55\u304b\u306b\u3064\u3044\u3066\u3001\u77e5\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>Google\u3084Yahoo\u306a\u3069\u306e\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3092\u4f8b\u306b\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u691c\u7d22\u3059\u308b\u5358\u8a9e\u3092\u691c\u7d22\u30a6\u30a3\u30f3\u30c9\u30a6\u3068\u547c\u3070\u308c\u308b<span style=\"color: #339966\"><strong>\u6587\u5b57\u5165\u529b\u30d5\u30a9\u30fc\u30e0<\/strong><\/span>\u306b\u5165\u529b\u3092\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6587\u5b57\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3082\u3001<span style=\"color: #0000ff\"><strong>\u30d5\u30a9\u30fc\u30e0\u306e\u4e00\u90e8<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u4ed6\u306b\u306f\u69d8\u3005\u306aWeb\u30b5\u30fc\u30d3\u30b9\u3067\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u308b\u3068\u304d\u306b\u3001\u4f4f\u6240\u3084\u5e74\u9f62\u3001\u96fb\u8a71\u756a\u53f7\u306a\u3069\u306e\u500b\u4eba\u60c5\u5831\u3092<span style=\"color: #0000ff\"><strong>\u5165\u529b<\/strong><\/span>\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u3092\u5165\u529b\u3059\u308b\u5834\u6240\u3082\u30d5\u30a9\u30fc\u30e0\u3067\u3042\u308b\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30d5\u30a9\u30fc\u30e0\u3067\u306f\u4f4f\u6240\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306b\u306f\u4f4f\u6240\u3092\u3001\u96fb\u8a71\u756a\u53f7\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306b\u306f\u96fb\u8a71\u756a\u53f7\u3092\u5165\u529b\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u308c\u3089\u306e\u30c1\u30a7\u30c3\u30af\u306f<span style=\"color: #0000ff\"><strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong><\/span>\u3068\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u306f<span style=\"color: #0000ff\"><strong>\u6587\u6cd5\u306e\u30c1\u30a7\u30c3\u30af<\/strong><\/span>\u304c\u3055\u308c\u3066\u3001\u6587\u6cd5\u304b\u3089\u5916\u308c\u305f\u3082\u306e\u306f\u5165\u529b\u3067\u304d\u306a\u3044\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u81ea\u5206\u305f\u3061\u3067\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001Django\u304b\u3089<span style=\"color: #0000ff\"><strong>\u63d0\u4f9b\u3055\u308c\u308b\u30af\u30e9\u30b9<\/strong><\/span>\u3092\u4f7f\u3048\u3070<span style=\"color: #0000ff\"><strong>\u7c21\u5358\u306b\u5b9f\u88c5<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a9\u30fc\u30e0\u306e\u4f5c\u308a\u65b9<\/h2>\n<p>\u3053\u3053\u304b\u3089\u306f\u5b9f\u969b\u306b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Django\u306e\u4e0b\u6e96\u5099<\/h3>\n<p>\u307e\u305a\u306fDjango\u306e\u4e0b\u6e96\u5099\u3092\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>Django\u306f<span style=\"color: #339966\"><strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u4e2d\u306b<span style=\"color: #339966\"><strong>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/strong><\/span>\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u57fa\u672c\u306e\u6d41\u308c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\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\u3067mySite\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\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\u3001myapp\u3068\u3044\u3046Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\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\u3001<span style=\"color: #339966\"><strong>mySite\/settings.py<\/strong><\/span>\u306e<span style=\"color: #339966\"><strong>INSTALLED_APPS<\/strong><\/span>\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<\/p>\n<p>\u3055\u3089\u306b<span style=\"color: #339966\"><strong>template\u30d5\u30a1\u30a4\u30eb<\/strong><\/span>\u3092\u7f6e\u304f\u5834\u6240\u3092<span style=\"color: #0000ff\"><strong>\u6307\u5b9a<\/strong><\/span>\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:python decode:true \">TEMPLATES = [\r\n    {\r\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\r\n        'DIRS': [\r\n          os.path.join(BASE_DIR, 'templates'),\r\n        ],\r\n        'APP_DIRS': True,\r\n        'OPTIONS': {\r\n            'context_processors': [\r\n                'django.template.context_processors.debug',\r\n                'django.template.context_processors.request',\r\n                'django.contrib.auth.context_processors.auth',\r\n                'django.contrib.messages.context_processors.messages',\r\n            ],\r\n        },\r\n    },\r\n]<\/pre>\n<p>TEMPLATES\u306e<span style=\"color: #339966\"><strong>\u2019DIRS\u2019<\/strong><\/span>\u306b\u3001<span style=\"color: #339966\"><strong>\u300cos.path.join(BASE_DIR, \u2018templates\u2019),\u300d<\/strong><\/span>\u3068\u3044\u3046\u547d\u4ee4\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001templates\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306btemplate\u30d5\u30a1\u30a4\u30eb\u3092\u5165\u308c\u3066\u3044\u304f\u3053\u3068\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u809d\u5fc3\u306etemplates\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001manage.py\u3068<span style=\"color: #0000ff\"><strong>\u540c\u3058\u968e\u5c64<\/strong><\/span>\u306b\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306etemplates\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b<span style=\"color: #339966\"><strong>html\u30d5\u30a1\u30a4\u30eb<\/strong><\/span>\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001template\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306findex.html\u3068\u3044\u3046\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p>template\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u305f\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u306f\u3001\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/26407\" 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\/image21-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Django\u5165\u9580\u3011template\u3068HTML\u3092\u4f7f\u3063\u3066Web\u30da\u30fc\u30b8\u3092\u8868\u793a\u3057\u3088\u3046<\/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<p>\u6b21\u306b<span style=\"color: #339966\"><strong>views.py<\/strong><\/span>\u3068<span style=\"color: #339966\"><strong>urls.py<\/strong><\/span>\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p>views.py\u306f\u3001\u3053\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.shortcuts import render\r\nfrom django.http.response import HttpResponse\r\n \r\ndef index_template(request):\r\n    return render(request, 'index.html')<\/pre>\n<p>\u3053\u308c\u3067index.html\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u8fd4\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u3001<span style=\"color: #339966\"><strong>myapp\/urls.py<\/strong><\/span>\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.conf.urls import url\r\nfrom . import views\r\n \r\nurlpatterns = [\r\n    url(r'^templates\/', views.index_template, name='index_template'),\r\n]<\/pre>\n<p>\u3053\u308c\u3067views.py\u3068myapp\/urls.py\u3092<span style=\"color: #0000ff\"><strong>\u3064\u306a\u3052\u308b<\/strong><\/span>\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b<span style=\"color: #339966\"><strong>mySite\/urls.py<\/strong><\/span>\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u6700\u521d\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u81ea\u5206\u3067\u4f5c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.conf.urls import include, url\r\nfrom django.contrib import admin\r\n \r\nurlpatterns = [\r\n    url(r'^myapp\/', include('myapp.urls', namespace='myapp')),\r\n    url(r'^admin\/', admin.site.urls),\r\n]<\/pre>\n<p>\u3053\u308c\u3067 http:\/\/localhost:8000\/myapp\/templates\/ \u306b\u63a5\u7d9a\u3059\u308b\u3068index.html\u3092\u8fd4\u3059\u3053\u3068\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\u884c\u3063\u305f\u4f5c\u696d\u306e\u8a73\u3057\u3044\u89e3\u8aac\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3067\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/25952\" 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-28-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Django\u5165\u9580\u3011views\u3092\u4f7f\u3063\u3066\u30da\u30fc\u30b8\u3092\u8868\u793a\u3055\u305b\u3088\u3046<\/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<p><span style=\"color: #339966\"><strong>runserver\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3067\u63a5\u7d9a\u3092\u3057\u3066\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u3051\u308c\u3070\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u308c\u304b\u3089\u306ftemplates\/index.html\u3092\u7de8\u96c6\u3057\u306a\u304c\u3089\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u306f\u8d77\u52d5\u3057\u305f\u307e\u307e\u3067\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067Django\u306e\u4e0b\u6e96\u5099\u306f\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u304b\u3089\u306f<span style=\"color: #339966\"><strong>\u30d5\u30a9\u30fc\u30e0<\/strong><\/span>\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>Django\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u65b9\u6cd5<\/h3>\n<p>\u3053\u308c\u304b\u3089\u306f\u5b9f\u969b\u306b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u69d8\u3005\u306a\u30d5\u30a9\u30fc\u30e0\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u30b5\u30a4\u30c8\u306e\u7ba1\u7406\u8005\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b\u305f\u3081\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>myapp\/forms.py<\/strong><\/span>\u3092\u4f5c\u308a\u3001\u3053\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django import forms\r\n \r\nclass ContactForm(forms.Form):\r\n    subject = forms.CharField(max_length=100)\r\n    message = forms.CharField(max_length=1000)\r\n    sender = forms.EmailField()<\/pre>\n<p>\u3053\u3053\u3067C<span style=\"color: #339966\"><strong>ontactForm\u30af\u30e9\u30b9<\/strong><\/span>\u3092\u5b9a\u7fa9\u3057\u3066<span style=\"color: #0000ff\"><strong>\u547c\u3073\u51fa\u3057<\/strong><\/span>\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>CharField<\/strong><\/span>\u3084<span style=\"color: #339966\"><strong>EmailField<\/strong><\/span>\u306a\u3069\u306f\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u306f\u3001\u30c7\u30fc\u30bf\u306e<span style=\"color: #0000ff\"><strong>\u7a2e\u985e\u3092\u8868\u3059<\/strong><\/span>\u305f\u3081\u306bDjango\u306b\u7528\u610f\u3055\u308c\u305f\u578b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306f\u69d8\u3005\u306a\u7a2e\u985e\u304c\u3042\u308a\u3001\u5f8c\u306e\u7ae0\u3067\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306bviews.py\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">from django.shortcuts import render\r\nfrom django.http.response import HttpResponse\r\nfrom .forms import ContactForm\r\n \r\ndef index_template(request):\r\n    form = ContactForm()\r\n    return render(request, 'index.html', {\r\n        'form': form,\r\n    })<\/pre>\n<p>\u3053\u3053\u3067\u306f\u5148\u7a0b\u306eforms.py\u306e\u60c5\u5831\u3092\u5f15\u304d\u7d99\u3044\u3067\u3001templates\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u5148\u7a0b\u306e http:\/\/localhost:8000\/myapp\/templates\/ \u3092\u66f4\u65b0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u8868\u793a\u304c\u51fa\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/ssform-300x170.png\" width=\"300\" height=\"170\" class=\"alignnone\" \/><\/p>\n<h2>\u30d5\u30a9\u30fc\u30e0\u3067\u4f7f\u3048\u308b\u305d\u306e\u4ed6\u306e\u30d5\u30a3\u30fc\u30eb\u30c9<\/h2>\n<p>\u5148\u7a0b\u89e3\u8aac\u3057\u305f\u3088\u3046\u306b\u3001\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306f<span style=\"color: #0000ff\"><strong>\u69d8\u3005\u306a\u7a2e\u985e<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u4e00\u90e8\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u4f7f\u3048\u305d\u3046\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>BooleanField\uff08\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\uff09<\/h3>\n<p>BooleanField\u306f<span style=\"color: #339966\"><strong>True\u304bFalse<\/strong><\/span>\u304b\u306e\u3088\u3046\u306b\u3001<span style=\"color: #0000ff\"><strong>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9<\/strong><\/span>\u306b\u3064\u3044\u3066\u306e\u5224\u5b9a\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u3046\u5834\u5408\u306b\u306f\u5fc5\u9808\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002<\/p>\n<h3>CharField\uff08\u6587\u5b57\u5217\u306e\u5165\u529b\uff09<\/h3>\n<p><span style=\"color: #339966\"><strong>CharField<\/strong><\/span>\u306f\u5148\u7a0b\u3082\u4f7f\u3063\u305f\u3088\u3046\u306b<span style=\"color: #0000ff\"><strong>\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>max_length<\/strong><\/span>\u3084<span style=\"color: #339966\"><strong>min_length<\/strong><\/span>\u3092\u5f15\u6570\u306b\u6e21\u3059\u3053\u3068\u3067\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3057\u3066\u6700\u77ed\u3001\u6700\u9577\u6587\u5b57\u5217\u3092\u6c7a\u3081\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<h3>EmailField\uff08\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5165\u529b\uff09<\/h3>\n<p><span style=\"color: #339966\"><strong>EmailField<\/strong><\/span>\u306f\u5185\u90e8\u3067\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3063\u3066\u9069\u5207\u306a<span style=\"color: #0000ff\"><strong>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong><\/span>\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u8907\u96d1\u306a<span style=\"color: #339966\"><strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong><\/span>\u3092\u7c21\u5358\u306b\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u308b\u306e\u306f\u3001Django\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u4f7f\u3046\u5927\u304d\u306a\u30e1\u30ea\u30c3\u30c8\u3067\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>FileField\uff08\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\uff09<\/h3>\n<p>\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u3046\u3068<span style=\"color: #0000ff\"><strong>\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u3084\u308a\u3068\u308a\u3092\u884c\u3046\u5834\u5408\u306f\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>URLField\uff08URL\u306e\u30ea\u30f3\u30af\uff09<\/h3>\n<p><span style=\"color: #339966\"><strong>URLField<\/strong><\/span>\u3067\u306f\u5165\u529b\u3055\u308c\u305f<span style=\"color: #339966\"><strong>URL<\/strong><\/span>\u304c\u9069\u6b63\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30ed\u30b0\u3067\u3088\u304f\u898b\u3089\u308c\u308b\u30c8\u30e9\u30c3\u30af\u30d0\u30c3\u30af\u306a\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u306a\u3069\u306b\u4f7f\u3046\u3079\u304d\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Django\u3067<span style=\"color: #339966\"><strong>\u30d5\u30a9\u30fc\u30e0<\/strong><\/span>\u3092\u4f5c\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308c\u3070\u4e00\u65b9\u7684\u306a\u30b5\u30a4\u30c8\u3067\u306f\u306a\u304f\u3001<span style=\"color: #0000ff\"><strong>\u53cc\u65b9\u5411\u306e\u3084\u308a\u3068\u308a<\/strong><\/span>\u304c\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<p>Django\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u3068\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u7ba1\u7406\u304c\u3068\u3066\u3082\u697d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Django\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u969b\u306f\u305c\u3072\u3001\u3053\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002ryo\u3067\u3059\u3002 \u4eca\u56de\u306fDjango\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u30d5\u30a9\u30fc\u30e0\u306b\u306f\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u3082\u306e\u3084\u6570\u5b57\u3092\u5165\u529b\u3059\u308b\u3082\u306e\u306a\u3069\u3001\u69d8\u3005\u306a\u6587\u6cd5\u3092\u53d7\u3051\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001 \u30fb\u30d5\u30a9\u30fc\u30e0\u3068\u306f\u4f55 [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":30788,"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-30742","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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742\" \/>\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742\" \/>\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-22T14:54:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:44:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.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\\\/30742#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046\",\"datePublished\":\"2017-08-22T14:54:48+00:00\",\"dateModified\":\"2024-05-06T02:44:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742\"},\"wordCount\":131,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-26.jpg\",\"keywords\":[\"Django\",\"python\"],\"articleSection\":[\"Python\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742\",\"name\":\"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\\\/30742#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-26.jpg\",\"datePublished\":\"2017-08-22T14:54:48+00:00\",\"dateModified\":\"2024-05-06T02:44:37+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\\\/30742#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-26.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-26.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/30742#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2017-08-22T14:54:48+00:00","article_modified_time":"2024-05-06T02:44:37+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.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\/30742#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/30742"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046","datePublished":"2017-08-22T14:54:48+00:00","dateModified":"2024-05-06T02:44:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/30742"},"wordCount":131,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/30742#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.jpg","keywords":["Django","python"],"articleSection":["Python\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/30742","url":"https:\/\/www.sejuku.net\/blog\/30742","name":"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/30742#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.jpg","datePublished":"2017-08-22T14:54:48+00:00","dateModified":"2024-05-06T02:44:37+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/30742"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/30742#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-26.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/30742#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Django\u5165\u9580\u3011\u30d5\u30a9\u30fc\u30e0\uff08forms\uff09\u3092\u4f5c\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\/30742","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=30742"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/30742\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/30788"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=30742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=30742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=30742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}