Coverage for pages.testproj.documents.views: 85%

# Coverage for pages.testproj.documents.views : 85%

## 13 statements 11 run 0 excluded 2 missing

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from django.shortcuts import render_to_response from django.template import RequestContext from pages.testproj.documents.models import Document def document_view(request, *args, **kwargs): context = RequestContext(request, kwargs) if kwargs.get('current_page', False): documents = Document.objects.filter(page=kwargs['current_page']) context['documents'] = documents if kwargs.has_key('document_id'): document = Document.objects.get(pk=int(kwargs['document_id'])) context['document'] = document context['in_document_view'] = True return render_to_response('pages/examples/index.html', context)