def districtIDFilter(queryset, querydict):
    try:
        id=int(querydict['pk'])
        queryset = queryset.filter(pk=id)

    except (__HOLE__, ValueError):
        pass
    return queryset
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/districtIDFilter