This commit is contained in:
2025-11-12 16:26:59 +01:00
parent fe3e502912
commit 804a751fdf
5 changed files with 234 additions and 1 deletions

View File

@@ -242,6 +242,10 @@ def render_newsletter_html(articles, tracking_enabled=False, pixel_tracking_id=N
trending_articles = articles[:3] if len(articles) >= 3 else articles
other_articles = articles[3:] if len(articles) > 3 else []
# Get weather data
from weather_service import get_munich_weather
weather = get_munich_weather()
# Prepare template data
now = datetime.now()
template_data = {
@@ -252,7 +256,8 @@ def render_newsletter_html(articles, tracking_enabled=False, pixel_tracking_id=N
'other_articles': other_articles,
'unsubscribe_link': f'{Config.WEBSITE_URL}/unsubscribe',
'website_link': Config.WEBSITE_URL,
'tracking_enabled': tracking_enabled
'tracking_enabled': tracking_enabled,
'weather': weather
}
# Render HTML