Django pagination in filtered search post results
问题 I have a view that filters out results for a posted search form: def profile_advanced_search(request): args = {} if request.method == "POST": form = AdvancedSearchForm(request.POST) qs=[] if form.is_valid(): cd = form.cleaned_data s_country=cd['country'] s_province=cd['province'] s_city = cd['city'] if s_country: qs.append(Q(country__icontains = s_country)) if s_province: qs.append( Q(province__icontains=s_province)) if s_city: qs.append( Q(city__icontains=s_city)) f = None for q in qs: if f