mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
rrs_upstream_email: Adapt to template rendering API change
With Django 1.10+, if you use get_template() to retrieve a template, then you can't pass a context when calling .render() on it, you need to pass a dict instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
227b9c65af
commit
0b6dac83b5
|
@ -104,7 +104,7 @@ def send_email(maintplan, recipes, options):
|
|||
|
||||
plaintext = get_template('rrs/report_email.txt')
|
||||
site_url = 'http://' + current_site.domain + reverse('rrs_frontpage')
|
||||
d = Context({
|
||||
d = {
|
||||
'maintplan': maintplan,
|
||||
'site': current_site,
|
||||
'site_url': site_url,
|
||||
|
@ -112,7 +112,7 @@ def send_email(maintplan, recipes, options):
|
|||
'total_upgradable_count': upgradable_count,
|
||||
'commits': commits,
|
||||
'recipelines': recipelines,
|
||||
})
|
||||
}
|
||||
text_content = plaintext.render(d)
|
||||
|
||||
msg = EmailMessage(subject_content, text_content, from_email, to_email_list)
|
||||
|
|
Loading…
Reference in New Issue
Block a user