| 속성 | AnonymousUser | User |
|---|---|---|
| is_authenticated | False | True |
| is_anonymous | True | False |
1) 현재 코드 임시로 stash에 저장
git stash push -m "임시: question-create 작업 중"
2) develop 브랜치로 이동
git checkout develop
3) develop 최신 내용 가져오기
git pull origin develop
4) 새로운 feature 브랜치 생성
git checkout -b feature/question-create
5) 아까 stash한 작업 불러오기
git stash pop
git add 커밋할 파일
git commit
git checkout develop
git pull origin develop
# git pull 했을 때 이미 최신이라고 하면 git rebase develop은 건너뜁니다.
git checkout feature/~
git rebase develop
# 최신화가 된 상태를 확인했다면 푸시합니다.
git push origin feature/login
쿼리 파라미터 는 views에서 확인
def make_user(self, **kwargs: Any) -> User: ...
| 역할 | 권장 위치 |
|---|---|
| 비즈니스/도메인 검증 (title 중복, category 존재 여부, 유저 권한 등) | Serializer가 담당하는 것이 DRF 공식 Best Practice |
| 요청 메서드 제어(GET/POST/PUT), 인증 여부 등 | View(APIView, GenericView)가 담당 |
