Merge branch 'main' into narl.io

This commit is contained in:
nvrl committed 2026-02-18 04:03:02 +01:00
commit 901b0b5e88
2 files changed
+7 -5

No files matched your search

+5 -5
View File
@@ -306,7 +306,7 @@ class UserViewSet(viewsets.ModelViewSet):
send_mail(
'Verify your Holy Flavors account',
f'Hi {username},\n\nYour verification code is: {code}',
'noreply@holyflavors.com',
settings.DEFAULT_FROM_EMAIL,
[email],
fail_silently=False,
)
@@ -430,7 +430,7 @@ class UserViewSet(viewsets.ModelViewSet):
send_mail(
'Confirm your new email',
f'Hi {user.username},\n\nYour confirmation code is: {code}',
'noreply@holyflavors.com',
settings.DEFAULT_FROM_EMAIL,
[email],
fail_silently=False,
)
@@ -488,7 +488,7 @@ class UserViewSet(viewsets.ModelViewSet):
send_mail(
'Password Reset Request',
f'Hi {user.username},\n\nYour password reset code is: {code}',
'noreply@holyflavors.com',
settings.DEFAULT_FROM_EMAIL,
[email],
fail_silently=False,
)
@@ -525,7 +525,7 @@ class UserViewSet(viewsets.ModelViewSet):
send_mail(
'Confirm Account Deletion - Holy Flavors Archive',
f'Hi {user.username},\n\nYou requested to delete your account. This action is permanent.\n\nYour deletion code is: {code}',
'noreply@holyflavors.com',
settings.DEFAULT_FROM_EMAIL,
[user.email],
fail_silently=False,
)
@@ -659,7 +659,7 @@ class AdminViewSet(viewsets.ViewSet):
send_mail(
'Holy Flavors Admin Test Email',
f'This is a test email sent to {request.user.email} from the Holy Flavors Admin Interface.',
'noreply@holyflavors.com',
settings.DEFAULT_FROM_EMAIL,
[request.user.email],
fail_silently=False,
)
+2
View File
@@ -206,6 +206,8 @@ EMAIL_USE_SSL = os.environ.get('EMAIL_USE_SSL', 'false').lower() == 'true'
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
EMAIL_SKIP_CERT_VERIFICATION = os.environ.get('EMAIL_SKIP_CERT_VERIFICATION', 'false').lower() == 'true'
DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', EMAIL_HOST_USER)
SERVER_EMAIL = DEFAULT_FROM_EMAIL
if EMAIL_HOST:
EMAIL_BACKEND = 'api.email_backend.InsecureEmailBackend'