コード例 #1
0
def watchstream(target_user, request):
    artwork = GallerySieve(user=request.user)
    artwork.filter_by_watches(target_user)

    return dict(
        artwork=artwork,
        target_user=target_user,
    )
コード例 #2
0
ファイル: albums.py プロジェクト: eevee/floof
def artwork(album, request):
    """Show a gallery of artwork for this album."""
    gallery_sieve = GallerySieve(user=request.user, formdata=request.params)
    gallery_sieve.filter_by_album(album)

    return dict(
        album=album,
        gallery_sieve=gallery_sieve,
    )
コード例 #3
0
ファイル: tags.py プロジェクト: silky/floof
def artwork(tag, request):
    """Show a gallery of artwork for this tag."""
    gallery_sieve = GallerySieve(user=request.user, formdata=request.params)
    gallery_sieve.filter_by_tag(tag.name)  # XXX this seems inefficient.

    return dict(
        tag=tag,
        gallery_sieve=gallery_sieve,
    )
コード例 #4
0
def artwork(album, request):
    """Show a gallery of artwork for this album."""
    gallery_sieve = GallerySieve(user=request.user, formdata=request.params)
    gallery_sieve.filter_by_album(album)

    return dict(
        album=album,
        gallery_sieve=gallery_sieve,
    )
コード例 #5
0
ファイル: tags.py プロジェクト: eevee/floof
def artwork(tag, request):
    """Show a gallery of artwork for this tag."""
    gallery_sieve = GallerySieve(user=request.user, formdata=request.params)
    gallery_sieve.filter_by_tag(tag.name)  # XXX this seems inefficient.

    return dict(
        tag=tag,
        gallery_sieve=gallery_sieve,
    )
コード例 #6
0
ファイル: labels.py プロジェクト: krinndnz/floof
def artwork(label, request):
    """Show a gallery of artwork for this label."""
    gallery_sieve = GallerySieve(user=request.user, formdata=request.params)
    gallery_sieve.filter_by_label(label)

    return dict(
        label=label,
        gallery_sieve=gallery_sieve,
    )
コード例 #7
0
def art_by_album(target_user, request):
    # XXX this is not by album.
    rel = request.matchdict['album']
    gallery_sieve = GallerySieve(user=request.user, formdata=request.GET, countable=True)
    gallery_sieve.filter_by_artist(target_user)

    return dict(
        rel=rel,
        gallery_sieve=gallery_sieve,
    )
コード例 #8
0
def browse(context, request):
    """Main gallery; provides browsing through absolutely everything we've
    got.
    """
    gallery_sieve = GallerySieve(user=request.user, formdata=request.GET)
    return dict(gallery_sieve=gallery_sieve)