바뀜

둘러보기로 가기 검색하러 가기
편집 요약 없음
180번째 줄: 180번째 줄:  
class User_create_form(UserCreationForm):
 
class User_create_form(UserCreationForm):
 
     class Meta:
 
     class Meta:
         model = get_user_model  #  설정된 커스텀모델
+
         model = get_user_model() #  설정된 커스텀모델
 
         fields = ["identifier"]  # password1,2 필드는 자동추가된다.
 
         fields = ["identifier"]  # password1,2 필드는 자동추가된다.
    
class User_change_form(UserChangeForm):
 
class User_change_form(UserChangeForm):
 
     class Meta:
 
     class Meta:
         model = get_user_model
+
         model = get_user_model()
 
         fields = ["identifier", "password1", "password2"]
 
         fields = ["identifier", "password1", "password2"]
 
</syntaxhighlight>password부분은 UserCreationForm에 정의된 것들이라 오버라이드 해줘야 한다.
 
</syntaxhighlight>password부분은 UserCreationForm에 정의된 것들이라 오버라이드 해줘야 한다.

둘러보기 메뉴