custom user model using drf rest auth rest all(쓰는 중)

·2020년 7월 18일
0

좌충우돌

목록 보기
13/26

에러 발생2

“non_field_errors”: [ “Unable to log in with provided credentials.”]

https://stackoverflow.com/questions/40076254/drf-auth-token-non-field-errors-unable-to-log-in-with-provided-credential

위 링크와 동일한 에러가 생겨서 약 6시간을 헤맸는데 결국 저 링크의 3번째 답변을 따라서 했더니 성공했다.

삽질을 정말 오지게 많이 했다. 그래도 오늘 성과는 로그인과 회원가입.

참고링크

Customizing authentication in Django

github: django/django/contrib/auth/models.py

django rest auth tutorial

django rest framework tutorial

REQUIRED_FIELDS는 USERNAME_FIELD와 password 이외에 빈칸으로 제출하면 안되는 항목을 명시하는 것이다.(출처: DJANGO 커스텀 유저 모델 만들기)

https://www.django-rest-framework.org/api-guide/serializers/#writing-update-methods-for-nested-representations

profile
이것저것 개발하는 것 좋아하지만 서버 개발이 제일 좋더라구요..

0개의 댓글