Django – reset password 구현

패스워드 초기화 구현하기 – 보통 메일로 보내고, 링크 받아서 초기화 하는 과정을 거치게 된다.

머 이거 테스트하려다 SMTP 설정하다 시간 다 낭비 할 거 같았는데, 파일로 SMTP 메일 내용을 적어주는 방법도 소개해 주고, 아주 유용하네 😁

To configure this, update our django_project/settings.py file by adding the following two lines at the bottom under our redirect URLs.

# django_project/settings.py
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = BASE_DIR / "sent_emails"

패스워드 초기화도 튜토리얼로 잘 되어 있는 링크를 발견!!

![](assets/images/2023/02/social-default-image.png?ssl=1)

따라만 하면 끝!

소스코드도 공개 되어 있네 – https://github.com/wsvincent/django-auth-tutorial

Share: Twitter Facebook
Bongjun Hur's Picture

About Bongjun Hur

BJ is a dev.

Seoul, Korea https://devbj.com