@register.assignment_tag
def get_containers_by(limit=None, **filters):
    cachekey = u'getcontainersby-{0}'.format(hash(frozenset(filters.items())))
    _cache = cache.get(cachekey)
    if _cache:
        return _cache

    site = settings.SITE_ID
    if settings.OPPS_CONTAINERS_SITE_ID:
        site = settings.OPPS_CONTAINERS_SITE_ID

    qs = Container.objects.all_published()
    qs = qs.filter(site=site, **filters)
    qs = qs[:limit]
    containers = [i for i in qs]

    cache.set(cachekey, containers, settings.OPPS_CACHE_EXPIRE)
    return containers
Return a list of containers filtered by given args
dataset/ETHPy150Open opps/opps/opps/containers/templatetags/container_tags.py/get_containers_by