def get_vote_count_today(self):\r
today = datetime.date.today()\r
return self.actions.filter(canceled=False, action_type__in=("voteup", "votedown"),\r
- action_date__range=(today - datetime.timedelta(days=1), today)).count()\r
+ action_date__gte=(today - datetime.timedelta(days=1))).count()\r
\r
def get_reputation_by_upvoted_today(self):\r
today = datetime.datetime.now()\r
def get_flagged_items_count_today(self):\r
today = datetime.date.today()\r
return self.actions.filter(canceled=False, action_type="flag",\r
- action_date__range=(today - datetime.timedelta(days=1), today)).count()\r
+ action_date__gte=(today - datetime.timedelta(days=1))).count()\r
\r
@true_if_is_super_or_staff\r
def can_view_deleted_post(self, post):\r