Exemplo n.º 1
0
def delete_album_by_slug(slug):
    """
    Album deletion can only be done based on slug, thus no conflicts
    """    
    album = get_album_by_slug(slug)
    [x.delete() for x in ContributorAlbum.scan({"slug": condition.EQ(album.slug)})]
    album.delete()
Exemplo n.º 2
0
def get_albums_by_username(username):
    
    return [Album.get(calbum.slug) for calbum in ContributorAlbum.scan({"username": condition.EQ(username)})]
        
    
Exemplo n.º 3
0
def get_album_contributors(album):
    return [Contributor.get(x.username) for x in ContributorAlbum.scan({"slug": condition.EQ(album.slug)})]
Exemplo n.º 4
0
def delete_contributor_by_username(username):
    Contributor.get(username).delete()
    [x.delete() for x in ContributorAlbum.scan({"username": condition.EQ(username)})]