django_nyt.management.commands package

Submodules

django_nyt.management.commands.notifymail module

class Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: BaseCommand

add_arguments(parser)

Entry point for subclassed commands to add custom arguments.

can_import_settings = True
handle(*args, **options)

The actual logic of the command. Subclasses must implement this method.

help = 'Sends notification emails to subscribed users taking into account the subscription interval'
send_loop(connection, sleep_time)
send_mails(connection, now, last_sent=None, user_settings=None)

Does the lookups and sends out email digests to anyone who has them due. Since the system may have different templates depending on which notification is being sent, we will generate a call for each template.

Module contents