mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-24 23:30:28 -05:00
fix: pass datetime module to test email template
Fixes warning 'datetime is undefined' that appeared when sending test emails. The test_email.html template was trying to use datetime.utcnow() to display the timestamp, but the datetime module wasn't included in the template context. This change ensures the HTML email template renders correctly with the formatted timestamp.
This commit is contained in:
+2
-1
@@ -432,7 +432,8 @@ TimeTracker - Time Tracking & Project Management
|
||||
mail_server=current_app.config.get('MAIL_SERVER'),
|
||||
mail_port=current_app.config.get('MAIL_PORT'),
|
||||
use_tls=current_app.config.get('MAIL_USE_TLS'),
|
||||
use_ssl=current_app.config.get('MAIL_USE_SSL')
|
||||
use_ssl=current_app.config.get('MAIL_USE_SSL'),
|
||||
datetime=datetime
|
||||
)
|
||||
current_app.logger.info("[EMAIL TEST] HTML template rendered successfully")
|
||||
except Exception as template_error:
|
||||
|
||||
Reference in New Issue
Block a user