회원가입과 로그인 일지(to be continued...)
막힌 부분
1. 커스텀 User 모델 대체하기
 ❌ 명세에 적혀있는 User모델 필드를 따로 정의해야 한다고 생각했다.
	⭕ 상속받는AbstractUser에 클래스 속성으로 이미 포함되어 있음!
	❌ User 모델 직접 참조함 : accounts/forms.py에서 model = User
	⭕ get_user_model() : User 모델을 참조할 때(forms.py빼고 다)
# 1. django.contrib.auth.get_user_model()
# 2. from django.contrib.auth import get_user_model	⭕ AUTH_USER_MODEL : 외래키로 User 모델을 참조할 때 대체 방법(forms.py에서만)
# from django.conf import settings2. UserCreationForm 사용하기
	❌ ArticleForm을 만드는 것처럼 UserForm을 정의하는 줄 알았다.
	⭕ 회원가입할 때는 UserCreationForm을 상속받아서 사용!!!
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import UserCreationForm
class CustomUserCreationForm(UserCreationForm):
    class Meta(UserCreationForm.Meta):
        model = get_user_model()
        fields = UserCreationForm.Meta.fieldsAuthor And Source
이 문제에 관하여(회원가입과 로그인 일지(to be continued...)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@noggrie21/회원가입과-로그인-일지to-be-continued저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)