def statistics(request): blocks = [] blocks.append(documents_statistics()) blocks.append(ocr_statistics()) return render_to_response('statistics.html', { 'blocks': blocks, 'title': _(u'Statistics') }, context_instance=RequestContext(request))
def statistics(request): if request.user.is_superuser or request.user.is_staff: blocks = [] blocks.append(documents_statistics()) blocks.append(ocr_statistics()) return render_to_response('statistics.html', { 'blocks': blocks, 'title': _(u'Statistics') }, context_instance=RequestContext(request)) else: raise PermissionDenied