def watchstream(target_user, request): artwork = GallerySieve(user=request.user) artwork.filter_by_watches(target_user) return dict( artwork=artwork, target_user=target_user, )
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, )
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, )
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, )
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, )
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)