def _fallback_results(locale, product_slugs):
 products = []
 for slug in product_slugs:
  try:
   p = Product.objects.get(slug=slug)
   products.append(p)
  except Product.DoesNotExist:
   pass
 (docs, fallback) = documents_for(locale, products=products)
 docs = (docs + (fallback or []))
 return docs[:20]

def _fallback_results ( locale , product_slugs ) : products = [ ] for slug in product_slugs : try : p = Product . objects . get ( slug = slug ) products . append ( p ) except Product . DoesNotExist : pass ( docs , fallback ) = documents_for ( locale , products = products ) docs = ( docs + ( fallback or [ ] ) ) return docs [ : 20 ]
return the top 20 articles by votes for the given product(s) .