Exemple #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()
Exemple #2
0
def get_albums_by_username(username):
    
    return [Album.get(calbum.slug) for calbum in ContributorAlbum.scan({"username": condition.EQ(username)})]
        
    
Exemple #3
0
def get_album_contributors(album):
    return [Contributor.get(x.username) for x in ContributorAlbum.scan({"slug": condition.EQ(album.slug)})]
Exemple #4
0
def delete_album_contributor(username, slug):
    ContributorAlbum.get(username, slug).delete()
Exemple #5
0
def delete_contributor_by_username(username):
    Contributor.get(username).delete()
    [x.delete() for x in ContributorAlbum.scan({"username": condition.EQ(username)})]