Beispiel #1
0
def list_collections(request):
    """list all collections in repository returns list of
    :class:`~genrepo.collection.models.CollectionObject`
    """
    colls = CollectionObject.all()
    colls = list(accessible(colls))
    colls.sort(key=lambda coll: coll.label.upper())  # sort based on label

    return render(request, "collection/list.html", {"colls": colls})
Beispiel #2
0
def list_collections(request):
    '''list all collections in repository returns list of
    :class:`~genrepo.collection.models.CollectionObject`
    '''
    colls = CollectionObject.all()
    colls = list(accessible(colls))
    colls.sort(key=lambda coll: coll.label.upper())  # sort based on label

    return render(request, 'collection/list.html', {'colls': colls})
Beispiel #3
0
def _collection_options():
    collections = list(accessible(CollectionObject.all()))
    options = [('', '')] + \
        [ ('info:fedora/' + c.pid, c.label or c.pid)
          for c in collections ]
    return options
Beispiel #4
0
def _collection_options():
    collections = list(accessible(CollectionObject.all()))
    options = [('', '')] + \
        [ ('info:fedora/' + c.pid, c.label or c.pid)
          for c in collections ]
    return options