Ejemplo n.º 1
0
def detail(request, repo, org, cid):
    collection = Collection.get(repo, org, cid)
    if not collection:
        raise Http404
    return render_to_response('ui/collections/detail.html', {
        'repo': repo,
        'org': org,
        'cid': cid,
        'object': collection,
        'entities': collection.entities(size=10),
    },
                              context_instance=RequestContext(request,
                                                              processors=[]))
Ejemplo n.º 2
0
def detail( request, repo, org, cid ):
    collection = Collection.get(repo, org, cid)
    if not collection:
        raise Http404
    return render_to_response(
        'ui/collections/detail.html',
        {
            'repo': repo,
            'org': org,
            'cid': cid,
            'object': collection,
            'entities': collection.entities(size=10),
        },
        context_instance=RequestContext(request, processors=[])
    )
Ejemplo n.º 3
0
def files(request, repo, org, cid):
    collection = Collection.get(repo, org, cid)
    if not collection:
        raise Http404
    paginator = Paginator(collection.files(size=elasticsearch.MAX_SIZE),
                          settings.RESULTS_PER_PAGE)
    page = paginator.page(request.GET.get('page', 1))
    return render_to_response('ui/collections/files.html', {
        'repo': repo,
        'org': org,
        'cid': cid,
        'object': collection,
        'paginator': paginator,
        'page': page,
    },
                              context_instance=RequestContext(request,
                                                              processors=[]))
Ejemplo n.º 4
0
def files( request, repo, org, cid ):
    collection = Collection.get(repo, org, cid)
    if not collection:
        raise Http404
    paginator = Paginator(collection.files(size=elasticsearch.MAX_SIZE), settings.RESULTS_PER_PAGE)
    page = paginator.page(request.GET.get('page', 1))
    return render_to_response(
        'ui/collections/files.html',
        {
            'repo': repo,
            'org': org,
            'cid': cid,
            'object': collection,
            'paginator': paginator,
            'page': page,
        },
        context_instance=RequestContext(request, processors=[])
    )