Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

회원 가입 및 인증 기능 구현 #7

@hatchling13

Description

@hatchling13

개요

CATLAS에서 회원 가입 및 인증 기능을 구현하기 위해 필요한 사항들을 기술한다.

1. 회원(Member) Django 모델 작성

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 테이블을 만들었다면 가입 및 인증 기능을 구현해야 한다.

가입/탈퇴

프론트엔드에서 입력되어 넘어온 정보를 받아 가입처리하는 로직이 필요하다. 또한, 사용자가 탈퇴를 원할 시 최소한의 확인절차를 거친 후 탈퇴처리하는 로직 또한 필요하다.

인증

인증 기능의 경우 knox라는 모듈에 대해서 알아보면 좋을 것이다.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions