-
Notifications
You must be signed in to change notification settings - Fork 17
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
List users email #446
List users email #446
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, 5 unresolved discussions / 0 of 1 LGTMs obtained / 0 of 1 approvals obtained
scionlab/management/commands/mass_email.py
line 27 at r1 (raw file):
class Command(BaseCommand): help = 'List the unique emails of the users in alphabetical order'
Suggestion:
List or send a message to
scionlab/management/commands/mass_email.py
line 38 at r1 (raw file):
destinataries
recipients ?
scionlab/management/commands/mass_email.py
line 59 at r1 (raw file):
is_anonymous
This is always going to be false here
scionlab/management/commands/mass_email.py
line 61 at r1 (raw file):
is_authenticated
This is always going to be true here
scionlab/management/commands/mass_email.py
line 73 at r1 (raw file):
def send(self, **kwargs): print('send email')
Suggestion:
print('sending email(s)')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, 5 unresolved discussions / 0 of 1 LGTMs obtained / 0 of 1 approvals obtained
scionlab/management/commands/mass_email.py
line 27 at r1 (raw file):
class Command(BaseCommand): help = 'List the unique emails of the users in alphabetical order'
Done.
scionlab/management/commands/mass_email.py
line 38 at r1 (raw file):
Previously, FR4NK-W wrote…
destinataries
recipients ?
Done. Replaced all in file.
scionlab/management/commands/mass_email.py
line 59 at r1 (raw file):
Previously, FR4NK-W wrote…
is_anonymous
This is always going to be false here
Done.
scionlab/management/commands/mass_email.py
line 61 at r1 (raw file):
Previously, FR4NK-W wrote…
is_authenticated
This is always going to be true here
Done.
scionlab/management/commands/mass_email.py
line 73 at r1 (raw file):
def send(self, **kwargs): print('send email')
Done (leftover)
The command can now list users and send email directly. Because we don't know the exact size of the batch size that the SMTP server accepts, we must allow to configure it, and when reached, send a new email.
Better help message for the mass email command. Replace the word destinatary with recipient. Remove unnecessary conditions is_anonymous or is_authenticated for objects of the User model (which are always identified and authenticated).
0c4888b
to
d4dd517
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 10 files at r1, 1 of 1 files at r2, 8 of 8 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
scionlab/management/commands/mass_email.py
line 55 at r3 (raw file):
# report user stats: anon = [] unauth = []
Left overs
scionlab/management/commands/mass_email.py
line 64 at r3 (raw file):
active.append(u) print(f'--------------------------- anonymous: {len(anon)}') print(f'--------------------------- unauthorized: {len(unauth)}')
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
scionlab/management/commands/mass_email.py
line 55 at r5 (raw file):
# report user stats: anon = [] unauth = []
Unused
scionlab/management/commands/mass_email.py
line 64 at r5 (raw file):
active.append(u) print(f'--------------------------- anonymous: {len(anon)}') print(f'--------------------------- unauthorized: {len(unauth)}')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Adds a command to list the users email addresses and send them an email.
To be used for service announcements.
This change is