comparison core/functions.py @ 1032:e932f2ecd4a7

Django 1.8 warnings / tech debt cleanup.
author Brian Neal <bgneal@gmail.com>
date Sat, 26 Dec 2015 15:10:55 -0600
parents f5aa74dcdd7a
children
comparison
equal deleted inserted replaced
1031:e1c03da72818 1032:e932f2ecd4a7
8 8
9 from django.contrib.sites.models import Site 9 from django.contrib.sites.models import Site
10 from django.conf import settings 10 from django.conf import settings
11 import django.core.mail 11 import django.core.mail
12 12
13 import core.tasks 13 from .tasks import send_mail as send_mail_task
14 14
15 15
16 class TemporaryFile(object): 16 class TemporaryFile(object):
17 """Context manager class for working with temporary files. 17 """Context manager class for working with temporary files.
18 18
68 'to': recipient_list, 68 'to': recipient_list,
69 'headers': headers, 69 'headers': headers,
70 } 70 }
71 71
72 if defer: 72 if defer:
73 core.tasks.send_mail.delay(**msg_kwargs) 73 send_mail_task.delay(**msg_kwargs)
74 else: 74 else:
75 msg = django.core.mail.EmailMessage(**msg_kwargs) 75 msg = django.core.mail.EmailMessage(**msg_kwargs)
76 msg.send() 76 msg.send()
77 77
78 78