mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
modified top-list api, junior-list api and junior-points api, nodified rank method, added mail for deactivating user from admin
This commit is contained in:
@ -18,27 +18,7 @@ from notifications.utils import send_notification
|
||||
|
||||
|
||||
@shared_task
|
||||
def send_email_otp(email, verification_code):
|
||||
"""
|
||||
used to send otp on email
|
||||
:param email: e-mail
|
||||
:param verification_code: otp
|
||||
"""
|
||||
from_email = settings.EMAIL_FROM_ADDRESS
|
||||
recipient_list = [email]
|
||||
send_templated_mail(
|
||||
template_name='email_reset_verification.email',
|
||||
from_email=from_email,
|
||||
recipient_list=recipient_list,
|
||||
context={
|
||||
'verification_code': verification_code
|
||||
}
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
@shared_task
|
||||
def send_mail(recipient_list, template, context: dict = None):
|
||||
def send_email(recipient_list, template, context: dict = None):
|
||||
"""
|
||||
used to send otp on email
|
||||
:param context:
|
||||
@ -48,7 +28,6 @@ def send_mail(recipient_list, template, context: dict = None):
|
||||
if context is None:
|
||||
context = {}
|
||||
from_email = settings.EMAIL_FROM_ADDRESS
|
||||
recipient_list = recipient_list
|
||||
send_templated_mail(
|
||||
template_name=template,
|
||||
from_email=from_email,
|
||||
|
||||
Reference in New Issue
Block a user