use a dictionary for context (django 1.11)

This commit is contained in:
Frédéric Péters 2019-05-06 10:36:15 +02:00
parent 7467c3dfb9
commit 7384d3e37d
1 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@ from io import BytesIO
from django.core.mail import EmailMessage
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.template import Context
from django.template.loader import get_template
from .models import Commune
@ -92,7 +91,7 @@ def email_sectors(formdatas, when):
sectors = defaultdict(list)
context = Context({'date': when})
context = {'date': when}
for data in formdatas:
fields = data['fields']