Include resend as a default dependency, rather than restricting to prod

This commit is contained in:
sabaimran
2024-12-16 22:24:41 -08:00
parent 741e9f56f9
commit 3b050a33bb
3 changed files with 20 additions and 24 deletions

View File

@@ -1,12 +1,8 @@
import logging
import os
try:
import resend
except ImportError:
pass
import markdown_it
import resend
from django.conf import settings
from jinja2 import Environment, FileSystemLoader
@@ -23,7 +19,7 @@ static_files = os.path.join(settings.BASE_DIR, "static")
env = Environment(loader=FileSystemLoader(static_files))
if not RESEND_API_KEY:
logger.warn("RESEND_API_KEY not set - email sending disabled")
logger.warning("RESEND_API_KEY not set - email sending disabled")
else:
resend.api_key = RESEND_API_KEY