diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-01-24 19:53:24 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-01-24 20:03:45 -0500 |
commit | ad2e22b999b3b795f60e0f95abcaf3b339567294 (patch) | |
tree | ebea9e231463d878ff869e4a74ecd4620e743a95 /forum/management/commands/send_email_alerts.py | |
parent | c4da893b2e28dbd2a04f8c6f61c52936119b1148 (diff) | |
download | askbot-ad2e22b999b3b795f60e0f95abcaf3b339567294.tar.gz askbot-ad2e22b999b3b795f60e0f95abcaf3b339567294.tar.bz2 askbot-ad2e22b999b3b795f60e0f95abcaf3b339567294.zip |
recaptcha for conventional registration\n\
simpler email subscription form at registration\n\
fixed urls in rss feed\n\
added experimental remote password login api (cleartext password for remote site entered locally)\n\
included example for Mediawiki Authentication plugin\n\
very simple message to everyone management command
Diffstat (limited to 'forum/management/commands/send_email_alerts.py')
-rw-r--r-- | forum/management/commands/send_email_alerts.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/forum/management/commands/send_email_alerts.py b/forum/management/commands/send_email_alerts.py index f5974e6b..62f13d69 100644 --- a/forum/management/commands/send_email_alerts.py +++ b/forum/management/commands/send_email_alerts.py @@ -7,7 +7,7 @@ from django.core.mail import EmailMessage from django.utils.translation import ugettext as _ from django.utils.translation import ungettext import datetime -import settings +from django.conf import settings import logging from utils.odict import OrderedDict @@ -58,10 +58,10 @@ class Command(NoArgsCommand): q_ans.cutoff_time = cutoff_time elif feed.feed_type == 'q_all': if user.tag_filter_setting == 'ignored': - ignored_tags = Tag.objects.filter(user_selections___reason='bad',user_selections__user=user) + ignored_tags = Tag.objects.filter(user_selections__reason='bad',user_selections__user=user) q_all = Q_set.exclude( tags__in=ignored_tags ) else: - selected_tags = Tag.objects.filter(user_selections___reason='good',user_selections__user=user) + selected_tags = Tag.objects.filter(user_selections__reason='good',user_selections__user=user) q_all = Q_set.filter( tags__in=selected_tags ) q_all.cutoff_time = cutoff_time #build list in this order @@ -154,6 +154,7 @@ class Command(NoArgsCommand): if num_q > 0: url_prefix = settings.APP_URL subject = _('email update message subject') + print 'have %d updated questions for %s' % (num_q, user.username) text = ungettext('%(name)s, this is an update message header for a question', '%(name)s, this is an update message header for %(num)d questions',num_q) \ % {'num':num_q, 'name':user.username} |