Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update feature to send emails to evalai users using amazon ses #1624

Merged
merged 8 commits into from Apr 5, 2018

Conversation

RishabhJain2018
Copy link
Member

@RishabhJain2018 RishabhJain2018 commented Apr 3, 2018

@deshraj Please review the PR.

Fixes #1549

'notification_email_conformation.html',
{'message': 'All the emails are sent successfully!'})
except:
return render(request,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever there is an exception, try to log it with proper severity level.

else:
return render(request, 'error404.html')
else:
return render(request, 'error404.html')
return render(request, 'error_superuser.html')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just return 404. No need to show exactly what happened.

template_name = 'notification_email.html'
emails = User.objects.all().exclude(email__isnull=True, email__exact='').values_list('email', flat=True)
htmly = get_template('notification_email.html')
users = list(User.objects.exclude(email__exact='').values_list('email', flat=True))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to convert to list? Doesn't values_list takes care of that? I am not sure about this though. Please add a comment on the line why we are converting to list if we need to do this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, for now we don't need that. Earlier boto required it to be converted to a list rather than Queryset object. :-)

@deshraj deshraj merged commit 22da173 into master Apr 5, 2018
@deshraj deshraj deleted the bulk-email branch April 5, 2018 20:03
HargovindArora pushed a commit to HargovindArora/EvalAI that referenced this pull request Nov 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants