summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2018-02-16 22:28:22 +0100
committerJelle van der Waa <jelle@vdwaa.nl>2018-04-08 12:51:19 +0200
commitcbb242f6bbe64bd69f597ccaca252f32d177cbf1 (patch)
tree62e4e063d74fe7b3f52f396c788339f0aa80e4ad /packages
parentc976d7eb3004e5c15ddb1929f22fa3532f11b9e9 (diff)
downloadarchweb-cbb242f6bbe64bd69f597ccaca252f32d177cbf1.tar.gz
archweb-cbb242f6bbe64bd69f597ccaca252f32d177cbf1.zip
treewide: context must be a dict rather than Context
Passing Context has been removed in Django 11, a dict should rather be passed.
Diffstat (limited to 'packages')
-rw-r--r--packages/management/commands/signoff_report.py6
-rw-r--r--packages/views/flag.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py
index a5022eeb..6749cf40 100644
--- a/packages/management/commands/signoff_report.py
+++ b/packages/management/commands/signoff_report.py
@@ -14,7 +14,7 @@ from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.db.models import Count
-from django.template import loader, Context
+from django.template import loader
from django.utils.timezone import now
from collections import namedtuple
@@ -106,7 +106,7 @@ def generate_report(email, repo_name):
subject = 'Signoff report for [%s]' % repo.name.lower()
t = loader.get_template('packages/signoff_report.txt')
- c = Context({
+ c = {
'repo': repo,
'signoffs_url': signoffs_url,
'disabled': disabled,
@@ -119,7 +119,7 @@ def generate_report(email, repo_name):
'old': old,
'old_days': old_days,
'leaders': leaders,
- })
+ }
from_addr = 'Arch Website Notification <nobody@archlinux.org>'
send_mail(subject, t.render(c), from_addr, [email])
diff --git a/packages/views/flag.py b/packages/views/flag.py
index 9fe60e2c..172de24f 100644
--- a/packages/views/flag.py
+++ b/packages/views/flag.py
@@ -6,7 +6,7 @@ from django.contrib.auth.decorators import permission_required
from django.core.mail import EmailMessage
from django.db import transaction
from django.shortcuts import get_object_or_404, redirect, render
-from django.template import loader, Context
+from django.template import loader
from django.utils.timezone import now
from django.views.decorators.cache import cache_page, never_cache
@@ -116,12 +116,12 @@ def flag(request, name, repo, arch):
if toemail:
# send notification email to the maintainers
tmpl = loader.get_template('packages/outofdate.txt')
- ctx = Context({
+ ctx = {
'email': email,
'message': message,
'pkg': pkg,
'packages': flagged_pkgs,
- })
+ }
msg = EmailMessage(subject,
tmpl.render(ctx),
'Arch Website Notification <nobody@archlinux.org>',