示例#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)