Пример #1
0
def champ_unconfirmed(group):
    today = date.today()
    
    activity_filters, metric_filters = build_filters(year=today.year, month=today.month)
    activity_filters.append({'group__slug': group.slug})
    
    return run_query(Activity.objects.filter(confirmed=False), activity_filters).count()
Пример #2
0
def champ_activities(group):
    today = date.today()
    
    activity_filters, metric_filters = build_filters(year=today.year, month=today.month)
    activity_filters.append({'group__slug': group.slug})
    print "looking up ", today.year, " m ", today.month
    
    return run_query(Activity.objects.all(), activity_filters).count()