def _apply_filters(query, start, end, locale=None, product=None):
 if (start is None):
  start = (date.today() - timedelta(days=90))
 query = query.filter(created__gte=start)
 if end:
  query = query.filter(created__lt=end)
 if locale:
  query = query.filter(locale=locale)
 if product:
  if isinstance(product, Product):
   product = product.slug
  query = query.filter(product=product)
 return query

def _apply_filters ( query , start , end , locale = None , product = None ) : if ( start is None ) : start = ( date . today ( ) - timedelta ( days = 90 ) ) query = query . filter ( created__gte = start ) if end : query = query . filter ( created__lt = end ) if locale : query = query . filter ( locale = locale ) if product : if isinstance ( product , Product ) : product = product . slug query = query . filter ( product = product ) return query
apply the date and locale filters to the eu query .