Added more complete help text to the show_messages and send_messags management commands.

- Legacy-Id: 17361
This commit is contained in:
Henrik Levkowetz 2020-02-27 20:24:31 +00:00
parent fc03063e9e
commit 34e6cae7d3
2 changed files with 22 additions and 2 deletions

View file

@ -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(

View file

@ -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)