raise NotEnoughRepPointsException(vote_type == 'up' and _('upvote') or _('downvote'))
user_vote_count_today = user.get_vote_count_today()
+ user_can_vote_count_today = user.can_vote_count_today()
if user_vote_count_today >= user.can_vote_count_today():
raise NotEnoughLeftException(_('votes'), str(settings.MAX_VOTES_PER_DAY))
}
}
- votes_left = (int(settings.MAX_VOTES_PER_DAY) - user_vote_count_today) + (vote_type == 'none' and -1 or 1)
+ votes_left = (user_can_vote_count_today - user_vote_count_today) + (vote_type == 'none' and -1 or 1)
if int(settings.START_WARN_VOTES_LEFT) >= votes_left:
response['message'] = _("You have %(nvotes)s %(tvotes)s left today.") % \
up_votes = user.vote_up_count\r
down_votes = user.vote_down_count\r
votes_today = user.get_vote_count_today()\r
- votes_total = int(settings.MAX_VOTES_PER_DAY)\r
+ votes_total = users.can_vote_count_today()\r
\r
user_tags = Tag.objects.filter(Q(nodes__author=user) | Q(nodes__children__author=user)) \\r
.annotate(user_tag_usage_count=Count('name')).order_by('-user_tag_usage_count')\r