def index(request):
all_runs = DataRun.objects.order_by('-run_start_time')
- #t = loader.get_template('experiments/index.html')
- #c = Context({
- # 'data_run_list': all_runs,
- #})
- #return HttpResponse(t.render(c))
- # shortcut to the above module usage
return render_to_response('experiments/index.html',{'data_run_list': all_runs})
def detail(request, run_folder):
if send:
email = EmailMessage(subject, body, sender, to=[user_email])
+ notified = set()
if bcc_managers:
- email.bcc = settings.MANAGERS
- email.bcc.append(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))