Thank you for the reply. I tried going the route of using the below.
Is your way better? Since 'in' needs a list as an argument and
SelectMultiple returns a list:
if request.method == "POST" or request.GET.get('page', ''):
search_form = SearchForm(request.POST)
if
> I am working on a search form that has a SelectMultiple widget. What
> would be the best way to make a complex lookup with the SelectMultiple
> widget?
try this:
try:
district_ids = [int(x) for x in request.GET.getlist('district')]
if len(district_ids) == 0:
district_ids = [
I am working on a search form that has a SelectMultiple widget. What
would be the best way to make a complex lookup with the SelectMultiple
widget?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
3 matches
Mail list logo