質問編集履歴
1
models.pyを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -369,3 +369,69 @@
|
|
369
369
|
|
370
370
|
|
371
371
|
```
|
372
|
+
|
373
|
+
models.py
|
374
|
+
|
375
|
+
```
|
376
|
+
|
377
|
+
class Skill(models.Model):
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
取得予定 = '取得予定'
|
382
|
+
|
383
|
+
取得中 = '取得中'
|
384
|
+
|
385
|
+
取得済み = '取得済み'
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
state = [
|
390
|
+
|
391
|
+
(取得予定, '取得予定'),
|
392
|
+
|
393
|
+
(取得中, '取得中'),
|
394
|
+
|
395
|
+
(取得済み, '取得済み'),
|
396
|
+
|
397
|
+
]
|
398
|
+
|
399
|
+
"""感想"""
|
400
|
+
|
401
|
+
member = models.ForeignKey(Member, verbose_name='名前', related_name='Skills', on_delete=models.CASCADE)
|
402
|
+
|
403
|
+
skill = models.CharField('資格', max_length=255)
|
404
|
+
|
405
|
+
state = models.CharField('状況', max_length=255, choices=state, default='取得済み')
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
def __str__(self):
|
412
|
+
|
413
|
+
return self.skill
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
class History(models.Model):
|
418
|
+
|
419
|
+
member = models.ForeignKey(Member, verbose_name='名前', related_name='Historys', on_delete=models.CASCADE)
|
420
|
+
|
421
|
+
period = models.CharField('yymm ~ yymm', max_length=255)
|
422
|
+
|
423
|
+
matter = models.CharField('案件', max_length=255)
|
424
|
+
|
425
|
+
comment = models.TextField(
|
426
|
+
|
427
|
+
verbose_name='業務内容,必要な知識',
|
428
|
+
|
429
|
+
blank=True,
|
430
|
+
|
431
|
+
null=False,
|
432
|
+
|
433
|
+
max_length=1000,)
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
```
|