def filingTimeFilter(queryset, querydict):
    try:
        time_range=querydict['time_range']
        if time_range == 'day':
            today = date.today()
            queryset = queryset.filter(filed_date=today)
        elif time_range == 'week':
            today = date.today()
            one_week_ago = today-timedelta(days=7)
            queryset = queryset.filter(filed_date__gte=one_week_ago)
        elif time_range == '2014_cycle':
            queryset = queryset.filter(filed_date__gte=date(2013,1,1), filed_date__lte=date(2014,12,31))
        elif time_range == '2016_cycle':
            queryset = queryset.filter(filed_date__gte=date(2015,1,1), filed_date__lte=date(2016,12,31))
    except __HOLE__:
        pass
    return queryset

# create a phony keyword committee class that is just a list of committee types allowed
# so superpacs would be 'UO' -- but if we wanted to included hybrids, it would be 'UOVW'
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/filingTimeFilter