SUB_QUESTION_LIST_LENGTH = 5
TRY_N_USER_TAGS = 5
SUB_QUESTION_LIST_LENGTH = 5
TRY_N_USER_TAGS = 5
class DigestQuestionsIndex(object):
def __init__(self, from_date):
self.from_date = from_date
class DigestQuestionsIndex(object):
def __init__(self, from_date):
self.from_date = from_date
new_member_count = new_members.count()
# The number of the flagged content for the day
new_member_count = new_members.count()
# The number of the flagged content for the day
- flagged_count = Flag.objects.all().count()
+ flagged_count = Flag.objects.filter(flagged_at__gt=datetime.datetime.today()-datetime.timedelta(days=1)).count()
if new_member_count >= SHOW_N_MORE_ACTIVE_NEW_MEMBERS:
new_members = new_members[:SHOW_N_MORE_ACTIVE_NEW_MEMBERS]
if new_member_count >= SHOW_N_MORE_ACTIVE_NEW_MEMBERS:
new_members = new_members[:SHOW_N_MORE_ACTIVE_NEW_MEMBERS]