Module ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier alias alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore Num ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr TupleLoad Call NameLoad Str Str keyword Str keyword Str keyword NameLoad keyword Str Call NameLoad Str Str keyword Str keyword Str keyword NameLoad keyword Str Call NameLoad Str Str keyword Str keyword Str keyword Str keyword Str Call NameLoad Str Str keyword Str keyword Str keyword Str keyword Str Call NameLoad Str Str keyword Str keyword Str keyword NameLoad keyword Str Call NameLoad Str Str keyword Str keyword Str keyword NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr ListLoad AttributeLoad SubscriptLoad NameLoad Index Str attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assert UnaryOpNot BoolOpAnd NameLoad NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr If UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Raise If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If UnaryOpNot NameLoad body Expr Call NameLoad Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Expr Call NameLoad Str Expr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword BinOpFloorDiv BinOpFloorDiv AttributeLoad BinOpSub NameLoad NameLoad attr Num Num attr Str orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad BinOpSub NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpMult BinOpSub SubscriptLoad Call NameLoad AttributeLoad NameLoad attr Index Num NameLoad Num NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Raise If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str ListLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Call AttributeLoad ListComp SubscriptLoad NameLoad Index Num comprehension NameStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr AttributeLoad NameLoad attr If CompareGt Call NameLoad SubscriptLoad NameLoad Index Str Num body While NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Break handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Continue ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Break decorator_list decorator_list
N/A __future__ absolute_import __future__ print_function __future__ unicode_literals N/A os N/A sys N/A time N/A smtplib N/A logging datetime datetime optparse make_option django.contrib.sites.models Site django.core mail django.core.management.base BaseCommand django.template.loader render_to_string django.utils.translation ugettext _ activate deactivate django.conf settings django_nyt models django_nyt settings nyt_settings N/A SLEEP_TIME 120 Command N/A BaseCommand N/A N/A can_import_settings True N/A help Sends notification emails to subscribed users taking into account the subscription interval N/A option_list N/A N/A BaseCommand option_list N/A N/A make_option --daemon -d action store_true dest daemon default False help Go to daemon mode and exit N/A make_option --cron -c action store_true dest cron default False help Do not loop, just send out emails once and exit N/A make_option --pid-file action store dest pid default /tmp/nyt_daemon.pid help Where to write PID before exiting N/A make_option --log-file action store dest log default /tmp/nyt_daemon.log help Where daemon should write its log N/A make_option --no-sys-exit action store_true dest no_sys_exit default False help Skip sys-exit after forking daemon (for testing purposes) N/A make_option --daemon-sleep-interval action store dest sleep_time default SLEEP_TIME help Minimum sleep between each polling of the database. _send_user_notifications N/A N/A self context connection N/A N/A N/A subject N/A _ N/A nyt_settings EMAIL_SUBJECT N/A message N/A render_to_string emails/notification_email_message.txt context N/A email N/A N/A mail EmailMessage subject message N/A nyt_settings EMAIL_SENDER N/A N/A N/A context N/A user email connection connection N/A N/A N/A N/A self logger info N/A Sending to: %s N/A N/A context N/A user email N/A N/A N/A email send fail_silently False N/A handle N/A N/A self N/A args options N/A N/A N/A activate N/A settings LANGUAGE_CODE N/A daemon N/A options N/A daemon N/A cron N/A options N/A cron N/A N/A N/A daemon cron You cannot both choose cron and daemon options N/A N/A self logger N/A N/A logging getLogger django_nyt N/A N/A N/A N/A self logger handlers N/A N/A daemon N/A N/A handler N/A N/A logging FileHandler filename N/A options N/A log N/A N/A handler N/A N/A logging StreamHandler N/A self stdout N/A N/A N/A N/A self logger addHandler handler N/A N/A N/A N/A self logger setLevel N/A logging INFO N/A N/A N/A N/A self logger info Starting django_nyt e-mail dispatcher N/A N/A N/A nyt_settings SEND_EMAILS N/A N/A N/A print E-mails disabled - quitting. N/A N/A N/A sys exit N/A daemon N/A N/A N/A N/A N/A self logger info Daemon mode enabled, forking N/A N/A N/A fpid N/A N/A os fork N/A N/A fpid 0 N/A N/A N/A N/A N/A self logger info N/A PID: %s N/A str fpid N/A pid_file N/A open N/A options N/A pid w N/A N/A N/A pid_file write N/A str fpid N/A N/A N/A pid_file close N/A N/A N/A options N/A no_sys_exit N/A N/A N/A N/A sys exit 0 N/A N/A N/A OSError N/A e N/A N/A N/A N/A N/A sys stderr write N/A fork failed: %d (%s)
 N/A N/A e errno N/A e strerror N/A N/A N/A sys exit 1 N/A N/A N/A connection N/A N/A mail get_connection N/A N/A N/A N/A N/A N/A N/A self logger error Could get a mail connection N/A N/A cron N/A N/A N/A N/A self send_mails connection N/A N/A N/A daemon N/A N/A N/A print Entering send-loop, CTRL+C to exit N/A N/A N/A N/A N/A self send_loop connection N/A int N/A options N/A sleep_time N/A N/A N/A KeyboardInterrupt N/A N/A N/A print 
Quitting... N/A N/A deactivate N/A send_loop N/A N/A self connection sleep_time N/A N/A N/A last_sent None N/A True N/A N/A started_sending_at N/A N/A datetime now N/A N/A N/A N/A self logger info N/A Starting send loop at %s N/A str started_sending_at N/A last_sent N/A N/A user_settings N/A N/A N/A N/A N/A N/A models Settings objects filter interval__lte N/A N/A N/A N/A started_sending_at last_sent seconds 60 60 order_by user N/A N/A user_settings None N/A N/A N/A self send_mails connection last_sent last_sent user_settings user_settings N/A N/A N/A connection close N/A last_sent N/A N/A datetime now N/A elapsed_seconds N/A N/A last_sent started_sending_at seconds N/A N/A N/A time sleep N/A max N/A N/A N/A N/A min N/A nyt_settings INTERVALS N/A 0 elapsed_seconds 60 sleep_time 0 N/A send_mails N/A N/A self connection last_sent user_settings N/A None None N/A N/A 
        Does the lookups and sends out email digests to anyone who has them due.
         N/A N/A N/A N/A self logger debug Entering send_mails() N/A N/A N/A N/A N/A connection open N/A N/A N/A N/A N/A N/A N/A self logger error Could not use e-mail connection N/A N/A N/A user_settings N/A N/A user_settings N/A N/A N/A N/A N/A N/A models Settings objects all order_by user N/A context N/A user username notifications digest site None None None None N/A N/A N/A Site objects get_current N/A setting user_settings N/A N/A N/A context N/A user N/A setting user N/A N/A context N/A username N/A getattr N/A setting user N/A N/A setting user USERNAME_FIELD N/A N/A context N/A notifications N/A N/A N/A context N/A digest N/A N/A N/A nyt_settings INTERVALS N/A N/A N/A N/A N/A y N/A 0 N/A y N/A nyt_settings INTERVALS index N/A setting interval N/A 1 N/A subscription N/A N/A N/A setting subscription_set filter send_emails True latest__is_emailed False N/A N/A N/A N/A N/A context N/A notifications append N/A subscription latest N/A N/A N/A len N/A context N/A notifications 0 N/A N/A True N/A N/A N/A N/A N/A N/A self _send_user_notifications context connection N/A n N/A context N/A notifications N/A N/A N/A n is_emailed True N/A N/A N/A n save N/A N/A N/A N/A N/A smtplib SMTPSenderRefused N/A N/A N/A N/A N/A self logger error N/A N/A E-mail refused by SMTP server ({}), skipping! format N/A N/A setting user email N/A N/A N/A N/A smtplib SMTPException N/A e N/A N/A N/A N/A N/A self logger error N/A N/A You have an error with your SMTP server connection, error is: {} format e N/A N/A N/A N/A self logger error Sleeping for 30s then retrying... N/A N/A N/A time sleep 30 N/A N/A Exception N/A e N/A N/A N/A N/A N/A self logger error N/A N/A Unhandled exception while sending, giving up: {} format e N/A N/A N/A