Beispiel #1
0
def tags():
    """
    Same as `conference.dataaccess.tags` but removing data about
    tags associated to a non-public profile.
    """
    from conference.dataaccess import tags as ctags
    cid = ContentType.objects.get(app_label='p3', model='p3profile').id
    hprofiles = set(models.P3Profile.objects\
        .exclude(profile__visibility__in=('m', 'p'))\
        .values_list('profile_id', flat=True))
    hset = set([(cid, pid) for pid in hprofiles])
    data = ctags()
    for tag, objects in data.items():
        data[tag] = objects - hset
    return data
Beispiel #2
0
def tags():
    """
    Fa la stessa cosa di `conference.dataaccess.tags` ma elimina le
    informazioni sui tag associati ad un profilo non pubblico.
    """
    from conference.dataaccess import tags as ctags
    cid = ContentType.objects.get(app_label='p3', model='p3profile').id
    hprofiles = set(models.P3Profile.objects\
        .exclude(profile__visibility__in=('m', 'p'))\
        .values_list('profile_id', flat=True))
    hset = set([(cid, pid) for pid in hprofiles])
    data = ctags()
    for tag, objects in data.items():
        data[tag] = objects - hset
    return data
Beispiel #3
0
def tags():
    """
    Fa la stessa cosa di `conference.dataaccess.tags` ma elimina le
    informazioni sui tag associati ad un profilo non pubblico.
    """
    from conference.dataaccess import tags as ctags
    cid = ContentType.objects.get(app_label='p3', model='p3profile').id
    hprofiles = set(models.P3Profile.objects\
        .exclude(profile__visibility__in=('m', 'p'))\
        .values_list('profile_id', flat=True))
    hset = set([(cid, pid) for pid in hprofiles])
    data = ctags()
    for tag, objects in data.items():
        data[tag] = objects - hset
    return data
Beispiel #4
0
def tags():
    """
    Same as `conference.dataaccess.tags` but removing data about
    tags associated to a non-public profile.
    """
    from conference.dataaccess import tags as ctags
    cid = ContentType.objects.get(app_label='p3', model='p3profile').id
    hprofiles = set(models.P3Profile.objects\
        .exclude(profile__visibility__in=('m', 'p'))\
        .values_list('profile_id', flat=True))
    hset = set([(cid, pid) for pid in hprofiles])
    data = ctags()
    for tag, objects in data.items():
        data[tag] = objects - hset
    return data