Added more complete help text to the show_messages and send_messags management commands.
- Legacy-Id: 17361
This commit is contained in:
parent
fc03063e9e
commit
34e6cae7d3
|
@ -15,7 +15,18 @@ from ietf.message.models import Message
|
||||||
from ietf.utils.mail import send_mail_message
|
from ietf.utils.mail import send_mail_message
|
||||||
|
|
||||||
class Command(BaseCommand):
|
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):
|
def add_arguments(self, parser):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
|
@ -14,7 +14,16 @@ from ietf.message.models import Message
|
||||||
from ietf.utils.mail import parseaddr
|
from ietf.utils.mail import parseaddr
|
||||||
|
|
||||||
class Command(BaseCommand):
|
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):
|
def add_arguments(self, parser):
|
||||||
default_start = datetime.datetime.now() - datetime.timedelta(days=14)
|
default_start = datetime.datetime.now() - datetime.timedelta(days=14)
|
||||||
|
|
Loading…
Reference in a new issue