{"id":2230,"date":"2020-11-18T11:28:21","date_gmt":"2020-11-18T02:28:21","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=2230"},"modified":"2020-11-18T11:28:21","modified_gmt":"2020-11-18T02:28:21","slug":"post-2230","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2020\/11\/18\/post-2230\/","title":{"rendered":"Django\uff1amodels.py \u306b\u8a18\u8f09\u3057\u305f\u53c2\u8003\u56f3\u66f8\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u7591\u554f\u3092\u8abf\u67fb\u3057\u305f"},"content":{"rendered":"<h2>Django\uff1amodels.py \u306b\u8a18\u8f09\u3057\u305f\u53c2\u8003\u56f3\u66f8\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u7591\u554f\u3092\u8abf\u67fb\u3057\u305f<\/h2>\n<p>\u53c2\u8003\u56f3\u66f8\u3092\u5143\u306b\u8272\u3005\u66f8\u3044\u3066\u3044\u308b\u3068\u7591\u554f\u306b\u601d\u3046\u3053\u3068\u304c\u591a\u3005\u51fa\u3066\u304d\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u305d\u306e\u4e2d\u3067\u3082Model\u306b\u95a2\u3059\u308b\u4e8b\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002<\/p>\n<h3>\u300efrom django.db import models\u300f\u3063\u3066\u4f55\uff1f<\/h3>\n<p>app\\models.py \u306b\u8a18\u8f09\u3059\u308b\u304a\u307e\u3058\u306a\u3044\u3002\u307e\u3041\u305d\u308a\u3083\u305d\u3046\u306a\u3093\u3060\u308d\u3046\u3051\u3069\u306d\u3002<\/p>\n<pre class=\"lang:default decode:true\">from django.db import models<\/pre>\n<p>\u3053\u308c\u306fLaravel\u6d41\u3067\u66f8\u3051\u3070\u3010use django\\db\\models;\u3011\u3068\u540c\u3058\u610f\u5473\u306e\u69d8\u3067\u3059\u3002<br \/>\n\u3044\u3084\u3001\u5bfe\u8c61\u304c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3060\u304b\u3089\u3010namespace django\\db\\models;\u3011\u306e\u65b9\u304c\u6b63\u3057\u3044\u304b\u306a\u3002<br \/>\n\u3064\u307e\u308a\u306f\u300cdjango\\db\u306e\u4e2d\u306emodels\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u8eab\u3092\u5229\u7528\u3059\u308b\u3088\u300d\u3068\u3044\u3046\u5ba3\u8a00\u3067\u3059\u3002<\/p>\n<p>\u300c\u304a\u307e\u3058\u306a\u3044\u300d\u3067\u306f\u306a\u304f\u3001\u3053\u3046\u8a00\u3046\u6240\u306e\u610f\u5473\u3092\u77e5\u3063\u3066\u304a\u304f\u3053\u3068\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u4f55\u3057\u3066\u308b\u304b\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<h3>Django\u306e\uff4dodels.py\u3067\u66f8\u3044\u305f\u30c6\u30fc\u30d6\u30eb\u8a2d\u5b9a<\/h3>\n<p>\u53c2\u8003\u56f3\u66f8\u3092\u9032\u3081\u3066\u3044\u308b\u3068\u3053\u3093\u306a\u8a18\u8f09\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#models.py \u5185\r\nclass app(models.Model)\r\n    user = models.ForeignKey(CustomUser, verbose_name='\u30e6\u30fc\u30b6\u30fc', on_delete=models.PROTECT)\r\n    title = models.CharField(verbose_name='\u30bf\u30a4\u30c8\u30eb', max_length=40)\r\n    content = models.TextField(verbose_name='\u672c\u6587', blank=True, null=True)\r\n    photo = models.ImageField(verbose_name='\u5199\u771f', blank=True, null=True)\r\n    created_at = models.DateTimeField(verbose_name='\u4f5c\u6210\u65e5\u6642', auto_now_add=True)\r\n    updated_at = models.DateTimeField(verbose_name='\u66f4\u65b0\u65e5\u6642', auto_now=True)\r\n<\/pre>\n<p>\u3046\u3093\u3001\u308f\u304b\u3089\u306a\u3044\u3053\u3068\u3060\u3089\u3051\u3002\u3068\u8a00\u3046\u4e8b\u3067\u8abf\u3079\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>ForeignKey\u3063\u3066\u306a\u306b\uff1f<\/h3>\n<p>ForeignKey\u306f\u30c6\u30fc\u30d6\u30eb\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"paperBox\">\n<ul>\n<li>1\u5bfe1\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\uff1amodels.ForeignKey(\u5b50, unique=True)<\/li>\n<li>1\u5bfe\u591a\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\uff1amodels.ForeignKey(\u5b50)<\/li>\n<li>\u591a\u5bfe\u591a\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\uff1amodels.ManyToManyField(\u5b50)<\/li>\n<\/ul>\n<\/div>\n<p>Laravel \u306e\u30e2\u30c7\u30eb\u3067\u8a18\u8f09\u3059\u308b\u3010 belongsTo \u3011\u3068\u540c\u3058\u69d8\u3067\u3059\u3002<\/p>\n<h3>\u591a\u5bfe1\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u306f\uff1f<\/h3>\n<p>Laravel\u3060\u3068Models\u3067\u300e1\u5bfe\u591a\u300f\u300e\u591a\u5bfe1\u300f\u306e\u8a2d\u5b9a\u3092\u65bd\u3057\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u5217\u6319\u3055\u308c\u305f\u4e2d\u306b\u300e\u591a\u5bfe1\u300f\u304c\u7121\u3044\u4e8b\u304c\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067\u3059\u304c\u3001Django\u3067\u306f\u610f\u8b58\u3059\u308b\u5fc5\u8981\u306f\u7121\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<div class=\"pointBox\">\n<p>Django\u3067\u306f\u300e\u591a\u5bfe1\u300f\u3092\u610f\u8b58\u3057\u306a\u304f\u3066\u3088\u3044<\/p>\n<\/div>\n<p>\u3053\u308c\u306fLaravel\u3068Django\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u306b\u8d77\u56e0\u3059\u308b\u3082\u306e\u306e\u69d8\u3067\u3059\u3002<br \/>\nLaravel\u3067\u306f\u57fa\u672c\u7684\u306b\u3010 \u30c6\u30fc\u30d6\u30eb\u306e\u6570 = Model\u306e\u6570\u3011\u3067SQL\u306e\u30c6\u30fc\u30d6\u30eb\u305d\u306e\u3082\u306e\u3092\u8868\u73fe\u3057\u305f\u5834\u6240\u304cModel\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u547d\u540d\u898f\u5236\u3067Model\u306b\u30c6\u30fc\u30d6\u30eb\u540d\u306e\u5358\u6570\u5f62\u3092\u4ed8\u3051\u308b\u4e8b\u304b\u3089\u3082\u3053\u306e\u69cb\u9020\u304c\u826f\u304f\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3067\u3001Django\u3067\u306f\u3010\u30a2\u30d7\u30ea\u306e\u6570 = Model\u306e\u6570\u3011\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\nModels.py\u306e\u4e2d\u306b\u306f\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u3092 [ class \u30c6\u30fc\u30d6\u30eb\u540d ]\u3068\u3057\u3066\u8a18\u8f09\u3059\u308b\u305f\u3081\u3001\u3042\u3048\u3066\u300e \u591a\u5bfe1 \u300f\u3092\u8868\u73fe\u3059\u308b\u5fc5\u8981\u304c\u7121\u3044\u3088\u3046\u3067\u3059\u3002\u203b\u300e1\u5bfe\u591a\u300f\u304c\u66f8\u3044\u3066\u3042\u308b\u3060\u3051\u3067\u9006\u306f\u7406\u89e3\u3067\u304d\u308b\u306e\u3067\u4e0d\u8981\u3068\u8a00\u3046\u4e8b\u306e\u69d8\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001Laravel\u3060\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u30e2\u30c7\u30eb\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\"># \u300e1\u5bfe\u591a\u300f\u306e\u6642 \u203b\u89aa\u306e\u30e2\u30c7\u30eb\u306b\u8a18\u8f09 \r\n  public function \u5b50(){\r\n    return $this-&gt;hasMany('App\\Models\\\u5b50');\r\n  }\r\n\r\n# \u300e\u591a\u5bfe1\u300f\u306e\u6642 \u203b\u3053\u306e\u30e2\u30c7\u30eb\u306b\u8a18\u8f09\r\n  public function \u89aa(){\r\n    return $this-&gt;belongsTo('App\\Models\\\u89aa');\r\n  }<\/pre>\n<p>Django\u3063\u3066\u300e\u591a\u5bfe1\u300f\u306f\u66f8\u304b\u306a\u3044\u306e\u304b\u3041\u3002<\/p>\n<h3>on_delete=models.PROTECT\u3063\u3066\u306a\u306b\uff1f<\/h3>\n<p>\u3053\u308c\u306f\u3001\u89aa\u30ec\u30b3\u30fc\u30c9\u3092\u524a\u9664\u3057\u305f\u6642\u306b\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5b50\u5074\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u3069\u3046\u3059\u308b\u304b\u3092\u6307\u793a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u69cb\u6587\u7684\u306b\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<pre class=\"lang:default decode:true\">models.ForeignKey (\u5b50, on_delete=models.\u6307\u793a)<\/pre>\n<p>\u6307\u793a\u306f\u57fa\u672c\u7684\u306bSQL\u3068\u540c\u3058\u3068\u8003\u3048\u3066\u3044\u3044\u3088\u3046\u3067\u3059\u3002\u30ec\u30b3\u30fc\u30c9\u524a\u9664\u6642\u306e\u9023\u52d5\u306b\u306f\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u304c\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<div class=\"borderBox\">\n<ul>\n<li>CASCADE\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u3082\u4e00\u7dd2\u306b\u6d88\u53bb\u3059\u308b\u3002<\/li>\n<li>PROTECT\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u306f\u524a\u9664\u3057\u306a\u3044\uff08\u305d\u306e\u307e\u307e\u6b8b\u3059\uff09\u3002<\/li>\n<li>SET_NULL\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u306bNULL\u3092\u4ee3\u5165\u3059\u308b\u3002\u203bNullable\u3067\u8a31\u53ef\u3057\u3066\u306a\u3044\u3068\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3002<\/li>\n<li>SET(\u5024)\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u306b\uff08\uff09\u3067\u6307\u793a\u3057\u305f\u5024\u3092\u5165\u308c\u308b\u3002<\/li>\n<li>SET_DEFAULT\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5024\u3092\u4ee3\u5165\u3059\u308b\u3002<\/li>\n<li>DO_NOTHING\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3044\u308b\u5024\u3092\u7a7a\u767d\u306b\u3059\u308b\u3002\u203b\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u306b\u4e0d\u5177\u5408\u3092\u3082\u305f\u3089\u3059\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u306e\u3067\u8981\u6ce8\u610f<\/li>\n<\/ul>\n<\/div>\n<h3>verbose_name\u3063\u3066\u306a\u306b\uff1f<\/h3>\n<p>\u4f55\u3068\u306a\u304f\u610f\u5473\u306f\u5206\u304b\u308b\u3093\u3067\u3059\u3051\u3069\u3001\u6b63\u78ba\u306b\u77e5\u308a\u305f\u3044\u306a\u3068\u3002<\/p>\n<div class=\"borderBox\">\n<p>\u7ba1\u7406\u753b\u9762\u3067\u306e\u30e2\u30c7\u30eb\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n<p>\u306a\u308b\u307b\u3069\u3002<br \/>\n\u3053\u308c\u3063\u3066Validation\u306e\u6642\u306e\u30a8\u30e9\u30fc\u30ab\u30e9\u30e0\u3092\u65e5\u672c\u8a9e\u3067\u8868\u8a18\u3059\u308b\u3088\u3046\u306b\u4ed5\u8fbc\u3081\u308b\u3063\u3066\u4e8b\u304b\u306a\uff1f<br \/>\n\u307e\u3060\u30c6\u30b9\u30c8\u51fa\u6765\u3066\u306a\u3044\u304b\u3089\u4e0d\u660e\u3060\u3051\u3069\u3001Laravel\u306f\u3053\u306e\u4f5c\u696d\u304c\u82e6\u75db\u306a\u306e\u3067\u51fa\u6765\u305f\u3089\u3042\u308a\u304c\u305f\u3044\u306a\u3041\u3068\u3002<br \/>\n\u3042\u30fc\u3001\u3067\u30821\u4ef6\u3065\u3064\u8a2d\u5b9a\u3059\u308b\u3093\u3060\u304b\u3089Laravel\u3068\u5909\u308f\u3089\u306a\u3044\u304b\u3002<\/p>\n<h3>verbose_name_plural\u3063\u3066\u306a\u306b\uff1f<\/h3>\n<p>\u53c2\u8003\u56f3\u66f8\u306b\u306f\u3053\u3093\u306a\u8a18\u8f09\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">  class Meta:\r\n    verbose_name_plural = 'app'<\/pre>\n<p>verbose_name\u304c\u3042\u308b\u4e0a\u306b\u4f55\u3092\u6307\u5b9a\u3059\u308b\u306e\u304b\u5168\u304f\u610f\u5473\u304c\u63a8\u6e2c\u3067\u304d\u306a\u3044\u3002<br \/>\n\u3053\u308c\u300c\u8907\u6570\u5f62\u8868\u8a18\u3092\u8f9e\u3081\u3066\u5358\u6570\u8868\u8a18\u306b\u3057\u307e\u3059\u306d(\u3064\u307e\u308a\u306f\u300e\uff53\u300f\u3092\u53d6\u308a\u307e\u3059\u306d)\u300d\u3068\u8a00\u3046\u4e8b\u3089\u3057\u3044\u3067\u3059\u3002<br \/>\n\u3010verbose_name='\u30e6\u30fc\u30b6\u30fc\u3011\u3068\u6307\u5b9a\u3057\u3066\u3044\u3066\u3082\u3001\u30ec\u30b3\u30fc\u30c9\u306f\u8907\u6570\u3042\u308b\u306e\u3067\u3010\u30e6\u30fc\u30b6\u30fcs\u3011\u3068\u8868\u8a18\u3055\u308c\u308b\u306e\u3060\u3068\u304b\u3002<br \/>\n\u305d\u308c\u3092 verbose_name_plural \u306b\u8a18\u8f09\u3059\u308b\u4e8b\u3067\u3010\u30e6\u30fc\u30b6\u30fc\u3011\u3068\u8a00\u3046\u8868\u8a18\u306b\u8abf\u6574\u3059\u308b\u3068\u3002<br \/>\n\u65e5\u672c\u8a9e\u30d9\u30fc\u30b9\u3067\u8003\u3048\u308c\u3070\u9762\u767d\u3044\u6a5f\u80fd\u3060\u3051\u3069...\u305d\u308c\u307b\u3069\u91cd\u8981\u6027\u3092\u611f\u3058\u306a\u304b\u3063\u305f\u308a\u3059\u308b...\u3002<\/p>\n<h3>SQL\u30ab\u30e9\u30e0\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u8981\u7d20\u6307\u5b9a<\/h3>\n<p>\u8a18\u8f09\u3057\u3066\u3044\u308b\u3068Django\u306eModel\u306fLaravel\u306edatabase\\migrations\u306b\u8fd1\u3044\u3082\u306e\u304c\u3042\u308b\u306a\u3068\u611f\u3058\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#Laravel \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u8a18\u8f09\u4f8b\r\nSchema::create('users', function (Blueprint $table) {\r\n  $table-&gt;increments('id');\r\n  $table-&gt;string('name');\r\n  $table-&gt;string('email')-&gt;unique();\r\n  $table-&gt;string('password');\r\n  $table-&gt;dateTime('last_login_at')-&gt;nullable();\r\n  $table-&gt;rememberToken();\r\n  $table-&gt;timestamps();<\/pre>\n<p>\u3053\u308c\u3068\u540c\u3058\u3067\u3001Django\u306eModel\u3067\u306f\u30ab\u30e9\u30e0\u306e\u8981\u7d20\u3092\u6307\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u203bLaravel\u306eModel\u3067\u306fValidation\u3067\u4f7f\u3046\u8981\u7d20\u6307\u5b9a\u306f\u3042\u308b\u3051\u3069\u5168\u30ab\u30e9\u30e0\u306e\u6307\u5b9a\u306f\u3057\u306a\u3044\u3002<\/p>\n<p>Django\u3067\u4f7f\u3048\u308b\u8981\u7d20\u6307\u793a\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<th><\/th>\n<th>Script<\/th>\n<th>\u30d5\u30a3\u30fc\u30eb\u30c9\u8981\u7d20<\/th>\n<\/tr>\n<tr>\n<th rowspan=\"8\">\u6587\u5b57\u5217\u7cfb<\/th>\n<td>CharField<\/td>\n<td>\u6587\u5b57\u5217<\/td>\n<\/tr>\n<tr>\n<td>SlugField<\/td>\n<td>\u30b9\u30e9\u30c3\u30b0<\/td>\n<\/tr>\n<tr>\n<td>URLField<\/td>\n<td>URL<\/td>\n<\/tr>\n<tr>\n<td>EmailField<\/td>\n<td>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/td>\n<\/tr>\n<tr>\n<td>UUIDField<\/td>\n<td>UUID<\/td>\n<\/tr>\n<tr>\n<td>FilePathField<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9<\/td>\n<\/tr>\n<tr>\n<td>GenericIPAddressField<\/td>\n<td>IP\u30a2\u30c9\u30ec\u30b9(v4\/v6\/\u4e21\u65b9)<\/td>\n<\/tr>\n<tr>\n<td>TextField<\/td>\n<td>\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2<\/td>\n<\/tr>\n<tr>\n<th rowspan=\"8\">\u6570\u5024\u7cfb<\/th>\n<td>IntegerField<\/td>\n<td>\u6574\u6570\uff0b\uff0d10\u6841<\/td>\n<\/tr>\n<tr>\n<td>IntegerField<\/td>\n<td>\u6574\u6570\uff0b\uff0d5\u6841<\/td>\n<\/tr>\n<tr>\n<td>SmallIntegerField<\/td>\n<td>\u6574\u6570\uff0b\uff0d5\u6841<\/td>\n<\/tr>\n<tr>\n<td>PositiveIntegerField<\/td>\n<td>10\u6841 \u30de\u30a4\u30ca\u30b9\u5024\u7121\u3057<\/td>\n<\/tr>\n<tr>\n<td>PositiveSmallIntegerField<\/td>\n<td>5\u6841 \u30de\u30a4\u30ca\u30b9\u5024\u7121\u3057<\/td>\n<\/tr>\n<tr>\n<td>BigIntegerField<\/td>\n<td>\u6574\u6570\uff0b\uff0d19\u6841<\/td>\n<\/tr>\n<tr>\n<td>FloatField<\/td>\n<td>\u6d6e\u52d5\u5c0f\u6570\u70b9<\/td>\n<\/tr>\n<tr>\n<td>DecimalField<\/td>\n<td>\u56fa\u5b9a\u5c0f\u6570\u70b9<\/td>\n<\/tr>\n<tr>\n<th rowspan=\"2\">\u7406\u8ad6\u5024\u7cfb<\/th>\n<td>BooleanField<\/td>\n<td>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9<\/td>\n<\/tr>\n<tr>\n<td>NullBooleanField<\/td>\n<td>\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u203bNULL\u53ef\u80fd<\/td>\n<\/tr>\n<tr>\n<th rowspan=\"4\">\u6642\u9593\u7cfb<\/th>\n<td>DateTimeField<\/td>\n<td>\u65e5\u6642<\/td>\n<\/tr>\n<tr>\n<td>TimeField<\/td>\n<td>\u6642\u9593<\/td>\n<\/tr>\n<tr>\n<td>DateField<\/td>\n<td>\u65e5\u4ed8<\/td>\n<\/tr>\n<tr>\n<td>DurationField<\/td>\n<td>\u671f\u9593<\/td>\n<\/tr>\n<tr>\n<th rowspan=\"2\">\u30d5\u30a1\u30a4\u30eb\u7cfb<\/th>\n<td>FileField<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td>ImageField<\/td>\n<td>\u753b\u50cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Laravel\u306b\u3082\u30d5\u30a1\u30a4\u30eb\u7cfb\u3063\u3066\u3042\u3063\u305f\u306e\u304b\u306a\u3002<br \/>\n\u666e\u901a\u306b\u4f55\u3082\u6c17\u306b\u305b\u305achar\u3067\u30d1\u30b9\u5165\u308c\u3066\u305f\u3051\u3069...\u3002<br \/>\n\u307e\u3041\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6307\u793a\u3092\u51fa\u305b\u3070\u305d\u308c\u306b\u6cbf\u3063\u3066\u52d5\u3044\u3066\u304f\u308c\u308b\u3068\u8a00\u3046\u4e8b\u3067\u3059\u306d\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u3088\u304f\u77e5\u3063\u3066\u3044\u308bLaavel\u3068\u5bfe\u6bd4\u3055\u305b\u3066\u3044\u304f\u3053\u3068\u3067Django\u3082\u4f55\u3068\u306a\u304f\u7406\u89e3\u51fa\u6765\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u53c2\u8003\u56f3\u66f8\u306f\u4e00\u901a\u308a\u7d42\u308f\u3063\u305f\u306e\u3067\u3001\u6b21\u306f\u601d\u3063\u305f\u59ff\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u524d\u306b\u3001\u307e\u305a\u306fDocker\u3067\u30d3\u30eb\u30c9\u3057\u306a\u304d\u3083\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Django\uff1amodels.py \u306b\u8a18\u8f09\u3057\u305f\u53c2\u8003\u56f3\u66f8\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u7591\u554f\u3092\u8abf\u67fb\u3057\u305f \u53c2\u8003\u56f3\u66f8\u3092\u5143\u306b\u8272\u3005\u66f8\u3044\u3066\u3044\u308b\u3068\u7591\u554f\u306b\u601d\u3046\u3053\u3068\u304c\u591a\u3005\u51fa\u3066\u304d\u307e\u3059\u3002 \u4eca\u56de\u306f\u305d\u306e\u4e2d\u3067\u3082Model\u306b\u95a2\u3059\u308b\u4e8b\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002 \u300efrom dj [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[38],"tags":[814,830,147,831,53,46,308],"class_list":["post-2230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-memorandum","tag-django","tag-models-py","tag-python","tag-sql","tag-53","tag-46","tag-308"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2020\/11\/django.png","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/2230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=2230"}],"version-history":[{"count":0,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/2230\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/2174"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=2230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=2230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=2230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}