aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 17:21:38 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:52:11 +1200
commit61b32b483d30463238a9649c3ba08e8d11011a56 (patch)
tree6940e93561b15f15a37291efdf34fb0b49ca1570 /layerindex
parentb4cfb049d9fda7fe82f97f8532abdb7272cf0a76 (diff)
downloadopenembedded-core-contrib-61b32b483d30463238a9649c3ba08e8d11011a56.tar.gz
views: fix regression in publish email sending code
In e902b67bccddf34d8bbd65ad6c81d078e945ebb8 I missed a couple of Context usages in the layer publish view and the result was that it broke publishing a layer (and apparently I didn't run a final test on that, shame on me). Thanks to Yi Zhao <yi.zhao@windriver.com> for pointing this out. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex')
-rw-r--r--layerindex/views.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/layerindex/views.py b/layerindex/views.py
index c84982ae0f..bc3cddfa83 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -20,7 +20,6 @@ from django.db import transaction
from django.contrib.auth.models import User, Permission
from django.db.models import Q, Count, Sum
from django.template.loader import get_template
-from django.template import Context
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.contrib import messages
@@ -277,19 +276,19 @@ def publish_view(request, name):
break
# create subject from subject template
- d = Context({
+ d = {
'layer_name': layeritem.name,
'site_name': request.META['HTTP_HOST'],
- })
+ }
subject = subjecttext.render(d).rstrip()
#create body from body template
- d = Context({
+ d = {
'maintainers': maintainer_names,
'layer_name': layeritem.name,
'layer_url': layer_url,
'help_contact': help_contact,
- })
+ }
body = bodytext.render(d)
tasks.send_email.apply_async((subject, body, from_email, [m.email for m in maintainers]))