Add expiry_days to template context

This commit is contained in:
Cameron Hyde
2022-10-21 11:02:17 +10:00
parent f5677e7028
commit cf95c4eafc
3 changed files with 5 additions and 0 deletions
@@ -17,6 +17,8 @@ the email is sent:
- terms_url Your T&Cs URL
- contact_email Your galaxy's contact email
- instance_resource_url Your galaxy's resource website URL
- expiry_days Days until the activation link expires
- custom_message Your Galaxy config custom_activation_email_message
Template begins here >>>>>>
<!DOCTYPE html>
@@ -17,6 +17,8 @@ sent:
- terms_url Your T&Cs URL
- contact_email Your galaxy's contact email
- instance_resource_url Your galaxy's resource website URL
- custom_message Your Galaxy config custom_activation_email_message
- expiry_days Days until the activation link expires
Template begins here>>>>>>
Thanks for signing up to use Galaxy!
+1
View File
@@ -526,6 +526,7 @@ class UserManager(base.ModelManager, deletable.PurgableManagerMixin):
'contact_email': self.app.config.error_email_to,
'instance_resource_url': self.app.config.instance_resource_url,
'custom_message': self.app.config.custom_activation_email_message,
'expiry_days': self.app.config.activation_grace_period,
}
body = template.render('mail/activation-email.txt', template_context, self.app.config.templates_dir)
html = template.render('mail/activation-email.html', template_context, self.app.config.templates_dir)