-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from Sahayana/mypage
[Mypage] 마이페이지 api 개발 완료
- Loading branch information
Showing
39 changed files
with
1,276 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""캐싱에 필요한 Key 관리""" | ||
|
||
# Friend | ||
RECOMMEND_FRIEND = "recommend_friend_{user_id}" | ||
USER_LIKE_DATA = "user_like_data_{user_id}" | ||
|
||
# Search | ||
|
||
USER_YOUTUBE = "youtube_user_{user_id}" | ||
USER_BOOK = "book_user_{user_id}" | ||
USER_NEWS = "news_user_{user_id}" | ||
USER_SHOPPING = "shopping_user_{user_id}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from celery import shared_task | ||
from django.core.mail import EmailMessage | ||
from django.core.mail import EmailMessage, send_mail | ||
from django.template.loader import render_to_string | ||
from django.utils.encoding import force_bytes | ||
from django.utils.http import urlsafe_base64_encode | ||
|
@@ -11,7 +11,7 @@ | |
|
||
|
||
@shared_task | ||
def send_email_verification(user_id: int) -> None: | ||
def send_email_verification(user_id: int): | ||
""" | ||
새로 생성한 유저에게 사용자 인증 이메일을 전송합니다. | ||
""" | ||
|
@@ -27,3 +27,14 @@ def send_email_verification(user_id: int) -> None: | |
) | ||
email_message = EmailMessage(EMAIL_VERIFY_TITLE, message, to=[user.email]) | ||
return email_message.send() | ||
|
||
|
||
@shared_task | ||
def send_temporary_password(email: str, temp_pw: str): | ||
return send_mail( | ||
"[alaltalk] 임시 비밀번호 메일입니다.", | ||
f"회원님의 임시 비밀번호는 {temp_pw} 입니다.\n로그인 후 비밀번호를 꼭 변경해주세요.", | ||
"[email protected]", | ||
[email], | ||
fail_silently=False, | ||
) |
Oops, something went wrong.