def addon_listing(request, default='name', theme=False):
 if theme:
  qs = request.user.addons.filter(type=amo.ADDON_PERSONA)
 else:
  qs = Addon.objects.filter(authors=request.user).exclude(type=amo.ADDON_PERSONA)
 filter_cls = (ThemeFilter if theme else AddonFilter)
 filter_ = filter_cls(request, qs, 'sort', default)
 return (filter_.qs, filter_)

def addon_listing ( request , default = 'name' , theme = False ) : if theme : qs = request . user . addons . filter ( type = amo . ADDON_PERSONA ) else : qs = Addon . objects . filter ( authors = request . user ) . exclude ( type = amo . ADDON_PERSONA ) filter_cls = ( ThemeFilter if theme else AddonFilter ) filter_ = filter_cls ( request , qs , 'sort' , default ) return ( filter_ . qs , filter_ )
set up the queryset and filtering for addon listing for dashboard .