AbstractUser
Django의 내장 사용자 모델(User)과 동일한 필드를 포함하지만, 이를 확장하거나 사용자 정의하기 쉽도록 설계된 부모 클래스
포함된 필드
username
password
first_name
last_name
기타 인증필드들(is_staff, is_active 등)

코린이가 사용하는 기본 AbstractUser
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class User(AbstractUser):
created_at = models.DateTimeField(auto_now_add=True) # 생성 시각 자동 기록
updated_at = models.DateTimeField(auto_now=True) # 수정 시각 자동 갱신
def __str__(self):
return self.username
settings.py 에도 app명.User 이렇게 넣어줍시다
AUTH_USER_MODEL = 'tests.User'