jm_p_op

django - AbstractUser 본문

py/django

django - AbstractUser

jm_p_op 2023. 4. 9. 18:37

user/models.py

from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class UserModel(AbstractUser):
    class Meta:
        db_table = "my_user"

settings.py

AUTH_USER_MODEL = 'user.UserModel'

'py > django' 카테고리의 다른 글

django-models.ForeignKey()  (0) 2023.04.11
django- form 형식  (0) 2023.04.10
.ForeignKey(object,option)  (0) 2023.04.07
django-Field list  (0) 2023.04.07
django - 데이터 추가  (0) 2023.04.07