Skip to content

Commit 34e6cae

Browse files
committed
Added more complete help text to the show_messages and send_messags management commands.
- Legacy-Id: 17361
1 parent fc03063 commit 34e6cae

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

ietf/message/management/commands/send_messages.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@
1515
from ietf.utils.mail import send_mail_message
1616

1717
class Command(BaseCommand):
18-
help = 'Show messages, by default unsent messages'
18+
help = """
19+
20+
Send (or re-send) messages saved as Message objects as outgoing emails. To
21+
show existing Message objects, use the show_messages management command.
22+
Messages to send can be indicateb by date ranges, a list of primary keys, or
23+
a list of Message-IDs. Unless the --resend switch is given, the inclusion
24+
of already sent messages in the date range or message lists will result in
25+
an error exit, in order to prevent inadvertent re-sending of message.
26+
Alternatively, the --unsent switch can be used to send only messages marked
27+
as not already sent from a date range or message list.
28+
29+
"""
1930

2031
def add_arguments(self, parser):
2132
parser.add_argument(

ietf/message/management/commands/show_messages.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@
1414
from ietf.utils.mail import parseaddr
1515

1616
class Command(BaseCommand):
17-
help = 'Show messages, by default unsent messages'
17+
help = """
18+
19+
Show outgoing messages that have been saved as Message objects. By default
20+
all messages from the last 2 weeks are shown. Selection can be made based
21+
on date and sent/unsent state. With the --pk option, only a list of primary
22+
keys are shown, otherwise, creation and send date, message-id, sender and
23+
primary recipients, and subject line is shown. The list of primary keys is
24+
suitable for input to the send_messages management command.
25+
26+
"""
1827

1928
def add_arguments(self, parser):
2029
default_start = datetime.datetime.now() - datetime.timedelta(days=14)

0 commit comments

Comments
 (0)