You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2021. It is now read-only.
A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps to a single database table. Django documentation
#4 의 회원 - member 테이블에 의거해 Django 모델을 작성한다. 단, #3 에 의거하여 개발 중에는 SQLite 기반으로 진행하도록 한다.
member_uid의 경우, Django는 기본적으로 각 모델에게 id라는 이름의 auto-incrementing primary key를 주므로 따로 넣지 않아도 된다.
2. Serializer 작성
Serializers allow complex data such as querysets and model instances to be converted to native Python datatypes that can then be easily rendered into JSON, XML or other content types. Django REST framework
Serializer를 작성함으로써, 위에서 작성한 모델을 쉽게 JSON 등의 데이터 포맷으로 변환할 수 있다. 추가적으로, ModelSerializer에 대해서 알아볼 수 있다.
3. 회원(Member) Django 모델 메소드 정의
회원 정보를 저장할 수 있는 모델/DB 테이블을 만들었다면 가입 및 인증 기능을 구현해야 한다.
가입/탈퇴
프론트엔드에서 입력되어 넘어온 정보를 받아 가입처리하는 로직이 필요하다. 또한, 사용자가 탈퇴를 원할 시 최소한의 확인절차를 거친 후 탈퇴처리하는 로직 또한 필요하다.