質問編集履歴

4

エラー場所の追加

2020/07/31 07:54

投稿

Lim-Nic
Lim-Nic

スコア18

test CHANGED
File without changes
test CHANGED
@@ -467,3 +467,9 @@
467
467
 
468
468
 
469
469
  ```
470
+
471
+
472
+
473
+ エラーが起こったと思われる場所
474
+
475
+ ![イメージ説明](848f39a8c3fd685f20e3e0f6e3671970.png)

3

追記

2020/07/31 07:54

投稿

Lim-Nic
Lim-Nic

スコア18

test CHANGED
File without changes
test CHANGED
@@ -176,6 +176,294 @@
176
176
 
177
177
 
178
178
 
179
-
180
-
181
- ```
179
+ ```
180
+
181
+ models.py
182
+
183
+ ```
184
+
185
+ import datetime
186
+
187
+ from django.db import models
188
+
189
+ from django.utils import timezone
190
+
191
+
192
+
193
+
194
+
195
+ class Schedule(models.Model):
196
+
197
+ """スケジュール"""
198
+
199
+ summary = models.CharField('概要', max_length=50)
200
+
201
+ description = models.TextField('詳細な説明', blank=True)
202
+
203
+ start_time = models.TimeField('開始時間', default=datetime.time(7, 0, 0))
204
+
205
+ end_time = models.TimeField('終了時間', default=datetime.time(7, 0, 0))
206
+
207
+ date = models.DateField('日付')
208
+
209
+ created_at = models.DateTimeField('作成日', default=timezone.now)
210
+
211
+ user_name = models.CharField('登録者', max_length=50)
212
+
213
+
214
+
215
+ def __str__(self):
216
+
217
+ return self.summary
218
+
219
+
220
+
221
+
222
+
223
+ class OptionItems(models.Model):
224
+
225
+ """カレンダーのオプション"""
226
+
227
+ option_time = models.TimeField('1日の開始時間', default=datetime.time(0, 0, 0))
228
+
229
+ user_name = models.CharField('登録者', max_length=50)
230
+
231
+
232
+
233
+
234
+
235
+ class OptionFriend(models.Model):
236
+
237
+
238
+
239
+ friend_name = models.CharField('フレンド', max_length=50)
240
+
241
+ user_name = models.CharField('登録者', max_length=50)
242
+
243
+
244
+
245
+
246
+
247
+ class Group(models.Model):
248
+
249
+
250
+
251
+ Group_name = models.CharField('グループ名', max_length=50)
252
+
253
+ description = models.TextField('詳細な説明', blank=True)
254
+
255
+ member = models.TextField('メンバー', blank=True)
256
+
257
+ user_name = models.CharField('登録者', max_length=50)
258
+
259
+
260
+
261
+
262
+
263
+ class Friend(models.Model):
264
+
265
+ """フレンド"""
266
+
267
+ name = models.CharField(max_length=100)
268
+
269
+ mail = models.EmailField(max_length=200)
270
+
271
+ gender = models.BooleanField()
272
+
273
+ age = models.IntegerField(default=0)
274
+
275
+ birthday = models.DateField()
276
+
277
+
278
+
279
+ def __str__(self):
280
+
281
+ return '<Friend:id=' + str(self.id) + ',' + self.name + '(' + str(self.age) + ')>'
282
+
283
+ ```
284
+
285
+ migrations 0001_initial.py
286
+
287
+ ```
288
+
289
+ # Generated by Django 2.1.5 on 2019-01-11 04:04
290
+
291
+
292
+
293
+ import datetime
294
+
295
+ from django.db import migrations, models
296
+
297
+ import django.utils.timezone
298
+
299
+
300
+
301
+
302
+
303
+ class Migration(migrations.Migration):
304
+
305
+
306
+
307
+ initial = True
308
+
309
+
310
+
311
+ dependencies = [
312
+
313
+ ]
314
+
315
+
316
+
317
+ operations = [
318
+
319
+ migrations.CreateModel(
320
+
321
+ name='Schedule',
322
+
323
+ fields=[
324
+
325
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
326
+
327
+ ('summary', models.CharField(max_length=50, verbose_name='概要')),
328
+
329
+ ('description', models.TextField(blank=True, verbose_name='詳細な説明')),
330
+
331
+ ('start_time', models.TimeField(default=datetime.time(7, 0), verbose_name='開始時間')),
332
+
333
+ ('end_time', models.TimeField(default=datetime.time(7, 0), verbose_name='終了時間')),
334
+
335
+ ('date', models.DateField(verbose_name='日付')),
336
+
337
+ ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='作成日')),
338
+
339
+ ],
340
+
341
+ ),
342
+
343
+ ]
344
+
345
+
346
+
347
+ ```
348
+
349
+ migrations 0002_auto_20200731.py
350
+
351
+ ```
352
+
353
+ # Generated by Django 3.0.3 on 2020-07-31 00:54
354
+
355
+
356
+
357
+ import datetime
358
+
359
+ from django.db import migrations, models
360
+
361
+
362
+
363
+
364
+
365
+ class Migration(migrations.Migration):
366
+
367
+
368
+
369
+ dependencies = [
370
+
371
+ ('app', '0001_initial'),
372
+
373
+ ]
374
+
375
+
376
+
377
+ operations = [
378
+
379
+ migrations.CreateModel(
380
+
381
+ name='Friend',
382
+
383
+ fields=[
384
+
385
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
386
+
387
+ ('name', models.CharField(max_length=100)),
388
+
389
+ ('mail', models.EmailField(max_length=200)),
390
+
391
+ ('gender', models.BooleanField()),
392
+
393
+ ('age', models.IntegerField(default=0)),
394
+
395
+ ('birthday', models.DateField()),
396
+
397
+ ],
398
+
399
+ ),
400
+
401
+ migrations.CreateModel(
402
+
403
+ name='Group',
404
+
405
+ fields=[
406
+
407
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
408
+
409
+ ('Group_name', models.CharField(max_length=50, verbose_name='グループ名')),
410
+
411
+ ('description', models.TextField(blank=True, verbose_name='詳細な説明')),
412
+
413
+ ('member', models.TextField(blank=True, verbose_name='メンバー')),
414
+
415
+ ('user_name', models.CharField(max_length=50, verbose_name='登録者')),
416
+
417
+ ],
418
+
419
+ ),
420
+
421
+ migrations.CreateModel(
422
+
423
+ name='OptionFriend',
424
+
425
+ fields=[
426
+
427
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
428
+
429
+ ('friend_name', models.CharField(max_length=50, verbose_name='フレンド')),
430
+
431
+ ('user_name', models.CharField(max_length=50, verbose_name='登録者')),
432
+
433
+ ],
434
+
435
+ ),
436
+
437
+ migrations.CreateModel(
438
+
439
+ name='OptionItems',
440
+
441
+ fields=[
442
+
443
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
444
+
445
+ ('option_time', models.TimeField(default=datetime.time(0, 0), verbose_name='1日の開始時間')),
446
+
447
+ ('user_name', models.CharField(max_length=50, verbose_name='登録者')),
448
+
449
+ ],
450
+
451
+ ),
452
+
453
+ migrations.AddField(
454
+
455
+ model_name='schedule',
456
+
457
+ name='user_name',
458
+
459
+ field=models.CharField(default=1, max_length=50, verbose_name='登録者'),
460
+
461
+ preserve_default=False,
462
+
463
+ ),
464
+
465
+ ]
466
+
467
+
468
+
469
+ ```

2

追記

2020/07/31 07:43

投稿

Lim-Nic
Lim-Nic

スコア18

test CHANGED
File without changes
test CHANGED
@@ -128,10 +128,54 @@
128
128
 
129
129
 
130
130
 
131
- ###補足画像
131
+ ###補足内容画像
132
132
 
133
133
 
134
134
 
135
135
  ![イメージ説明](e2dde748e438963cea5fb814744f391f.png)
136
136
 
137
137
  ![イメージ説明](88a225508f37555ad22ee2602552ce82.png)
138
+
139
+
140
+
141
+ >>>psql -U admin -d ****
142
+
143
+ >>>\d auth_user
144
+
145
+ の結果
146
+
147
+ ```
148
+
149
+ テーブル "public.auth_user"
150
+
151
+ 列 | 型 | 照合順序 | Null 値を許容 | デフォルト
152
+
153
+ --------------+--------------------------+----------+---------------+---------------------------------------
154
+
155
+ id | integer | | not null | nextval('auth_user_id_seq'::regclass)
156
+
157
+ password | character varying(128) | | not null |
158
+
159
+ last_login | timestamp with time zone | | |
160
+
161
+ is_superuser | boolean | | not null |
162
+
163
+ username | character varying(150) | | not null |
164
+
165
+ first_name | character varying(30) | | not null |
166
+
167
+ last_name | character varying(150) | | not null |
168
+
169
+ email | character varying(254) | | not null |
170
+
171
+ is_staff | boolean | | not null |
172
+
173
+ is_active | boolean | | not null |
174
+
175
+ date_joined | timestamp with time zone | | not null |
176
+
177
+
178
+
179
+
180
+
181
+ ```

1

画像挿入

2020/07/31 06:42

投稿

Lim-Nic
Lim-Nic

スコア18

test CHANGED
File without changes
test CHANGED
@@ -125,3 +125,13 @@
125
125
 
126
126
 
127
127
  その他必要な情報があれば教えて下さい。
128
+
129
+
130
+
131
+ ###補足画像
132
+
133
+
134
+
135
+ ![イメージ説明](e2dde748e438963cea5fb814744f391f.png)
136
+
137
+ ![イメージ説明](88a225508f37555ad22ee2602552ce82.png)