From 34e6cae7d39d59c31c4c974c94a9d90fed015847 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 27 Feb 2020 20:24:31 +0000 Subject: [PATCH] Added more complete help text to the show_messages and send_messags management commands. - Legacy-Id: 17361 --- ietf/message/management/commands/send_messages.py | 13 ++++++++++++- ietf/message/management/commands/show_messages.py | 11 ++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ietf/message/management/commands/send_messages.py b/ietf/message/management/commands/send_messages.py index 4334aca9f..3eea53034 100644 --- a/ietf/message/management/commands/send_messages.py +++ b/ietf/message/management/commands/send_messages.py @@ -15,7 +15,18 @@ from ietf.message.models import Message from ietf.utils.mail import send_mail_message class Command(BaseCommand): - help = 'Show messages, by default unsent messages' + help = """ + + Send (or re-send) messages saved as Message objects as outgoing emails. To + show existing Message objects, use the show_messages management command. + Messages to send can be indicateb by date ranges, a list of primary keys, or + a list of Message-IDs. Unless the --resend switch is given, the inclusion + of already sent messages in the date range or message lists will result in + an error exit, in order to prevent inadvertent re-sending of message. + Alternatively, the --unsent switch can be used to send only messages marked + as not already sent from a date range or message list. + + """ def add_arguments(self, parser): parser.add_argument( diff --git a/ietf/message/management/commands/show_messages.py b/ietf/message/management/commands/show_messages.py index ceea5c21c..9581eedb1 100644 --- a/ietf/message/management/commands/show_messages.py +++ b/ietf/message/management/commands/show_messages.py @@ -14,7 +14,16 @@ from ietf.message.models import Message from ietf.utils.mail import parseaddr class Command(BaseCommand): - help = 'Show messages, by default unsent messages' + help = """ + + Show outgoing messages that have been saved as Message objects. By default + all messages from the last 2 weeks are shown. Selection can be made based + on date and sent/unsent state. With the --pk option, only a list of primary + keys are shown, otherwise, creation and send date, message-id, sender and + primary recipients, and subject line is shown. The list of primary keys is + suitable for input to the send_messages management command. + + """ def add_arguments(self, parser): default_start = datetime.datetime.now() - datetime.timedelta(days=14)