質問編集履歴

1

追記

2024/08/05 05:00

投稿

student
student

スコア79

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,19 @@
9
9
  ```
10
10
 
11
11
  ### 該当のソースコード
12
+ 追記
13
+ ```accounts/models.py
14
+ from django.db import models
15
+ from django.contrib.auth.models import AbstractUser
16
+
17
+ # Create your models here.
18
+ class CustomUser(AbstractUser):
19
+ """拡張ユーザーモデル"""
20
+ class Meta(AbstractUser.Meta):
21
+ db_table = 'custom_user'
22
+ image = models.ImageField('プロフィール画像', upload_to='images',blank=False, null=True)
23
+ self_introduction = models.CharField('自己紹介', blank=False, null=True, default=0, max_length=1000)
24
+ ```
12
25
 
13
26
  ```accounts/views.py
14
27
  from django.shortcuts import render, redirect