Exemple #1
0
def detail(request, document_id):
    document = get_object_or_404(Document, pk=document_id, status=1)
    response = render_to_response('documents/detail.html', {
        'document': document,
    },
                                  context_instance=RequestContext(request))
    set_recent_checked(request, 'Document', document_id)

    return response
Exemple #2
0
def detail(request, document_id):
    document = get_object_or_404(Document, pk=document_id, status=1)
    response = render_to_response(
        'documents/detail.html',
        {
            'document': document,
        },
        context_instance=RequestContext(request)
    )
    set_recent_checked(request, 'Document', document_id)

    return response
Exemple #3
0
def detail(request, seminar_id):
    seminar = get_object_or_404(Seminar, pk=seminar_id, status=1)
    entry_count = SeminarEntryUser.objects.count_entry(seminar)
    is_entered = False
    if request.user.is_authenticated() and (
            SeminarEntryUser.objects.is_entered(seminar, request.user)):
        is_entered = True
    response = render_to_response('seminars/detail.html', {
        'seminar': seminar,
        'entry_count': entry_count,
        'is_entered': is_entered,
    },
                                  context_instance=RequestContext(request))
    set_recent_checked(request, 'Seminar', seminar_id)
    return response