if send:
email = EmailMessage(subject, body, sender, to=[user_email])
+ notified = set()
if bcc_managers:
- email.bcc = settings.MANAGERS
- email.bcc = settings.NOTIFICATION_BCC
+ for manager in settings.MANAGERS:
+ if len(manager) > 0:
+ notified.add(manager)
+ for user in settings.NOTIFICATION_BCC:
+ if len(user) > 0:
+ notified.add(user)
+ email.bcc = list(notified)
email.send()
emails.append((user_email, subject, body, sending))
"""
data_file = get_object_or_404(DataFile, random_key = key)
- mimetype = 'application/octet-stream'
+ content_type = 'application/octet-stream'
if data_file.file_type.mimetype is not None:
- mimetype = data_file.file_type.mimetype
+ content_type = data_file.file_type.mimetype
if os.path.exists(data_file.pathname):
return HttpResponse(open(data_file.pathname,'r'),
- mimetype=mimetype)
+ content_type=content_type)
raise Http404