▶ Login 로그인
Session을 Create 하는 과정
▶ AuthenticationForm()
로그인 인증에 사용할 데이터를 입력받는 built-in form
* Github 참고
https://github.com/django/django/blob/main/django/contrib/auth/forms.py#L286
django/django/contrib/auth/forms.py at main · django/django
The Web framework for perfectionists with deadlines. - django/django
github.com
▶ 로그인 페이지 작성
![]() |
![]() |
![]() |
![]() |
▶ login(request, user)
AuthenticationForm을 통해
인증된 사용자를 로그인하는 함수
▶ get_user()
AuthenticationForm의 인스턴스 매서드
-> 유효성 검사를 통과했을 경우, 로그인 한 사용자 객체를 반환한다
*Github 참고
https://github.com/django/django/blob/main/django/contrib/auth/forms.py#L356
django/django/contrib/auth/forms.py at main · django/django
The Web framework for perfectionists with deadlines. - django/django
github.com
▶ 세션 데이터 확인하기
1. django_session 테이블에서 확인하기
2. 브라우저에서 확인하기
개발자도구 - Application - Cookies
▶ 로그인 링크 작성
'WEB > Django concept' 카테고리의 다른 글
[Django][Authentication System1] Template에서 인증 관련 데이터 출력하기 (0) | 2024.04.20 |
---|---|
[Django][Authentication System1] 로그아웃 == 세션을 지우는 과정 (0) | 2024.04.20 |
[Django][Authentication System1] 인증 시스템, User Model 대체하기 (0) | 2024.04.20 |
[Django][Authentication System1] Cookie & Session (0) | 2024.04.20 |
[Django][Static Files] Media files (0) | 2024.04.20 |