質問編集履歴
1
ソースコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -191,3 +191,39 @@
|
|
191
191
|
|
192
192
|
|
193
193
|
```
|
194
|
+
|
195
|
+
models.py
|
196
|
+
|
197
|
+
```
|
198
|
+
|
199
|
+
from django.db import models
|
200
|
+
|
201
|
+
from django.contrib.auth.models import AbstractBaseUser
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
class User(AbstractBaseUser):
|
208
|
+
|
209
|
+
username = models.CharField('氏名', max_length=255)
|
210
|
+
|
211
|
+
password1 = models.CharField('パスワード', max_length=255)
|
212
|
+
|
213
|
+
password2 = models.CharField('パスワード確認', max_length=255)
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
USERNAME_FIELD = 'username'
|
218
|
+
|
219
|
+
REQUIRED_FIELDS = []
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
def __str__(self):
|
224
|
+
|
225
|
+
return self.username
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
```
|