account, schduels, timezone profile and many imporant updates

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-19 15:37:03 +00:00
parent 618ed8b8c6
commit e7219a2390
28 changed files with 919 additions and 358 deletions

View File

@@ -1271,6 +1271,31 @@ def send_password_reset_email(user, reset_token):
)
def send_team_invite_email(invited_user, inviter, account, reset_token):
"""Send team invitation email with password setup link"""
service = get_email_service()
frontend_url = getattr(settings, 'FRONTEND_URL', 'http://localhost:3000')
inviter_name = inviter.first_name or inviter.email
invited_name = invited_user.first_name or invited_user.email
context = {
'inviter_name': inviter_name,
'invited_name': invited_name,
'account_name': account.name,
'reset_url': f'{frontend_url}/reset-password?token={reset_token}',
'frontend_url': frontend_url,
}
return service.send_transactional(
to=invited_user.email,
subject=f"You're invited to join {account.name} on IGNY8",
template='emails/team_invite.html',
context=context,
tags=['auth', 'team-invite'],
)
def send_email_verification(user, verification_token):
"""Send email verification link"""
service = get_email_service()