def weekFilter(queryset, querydict):
    try:
        week=querydict['week']

        # if there's no commas, it's just a single district
        if week.upper() == "NOW":
            queryset = queryset.filter(cycle_week_number = get_week_number(date.today()) )
        if week.upper() == "LAST":
            queryset = queryset.filter(cycle_week_number = get_week_number(date.today())-1 )


    except __HOLE__:
        pass

    return queryset
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/weekFilter