def delete(account, gallery):
    """ Delete gallery and all pictures belonging to it. """
    _assert_can_edit(account, gallery)
    for picture in gallery.pictures.all():
        remove(account, picture)
    gallery.delete()