def reporting_view(request, *arg, **kwargs): ''' display the reports page show a 404 if the user is not authorised to see the view ''' if is_user_in_groups(REPORT_GROUPS, request.user) is False: raise Http404 return render(request, 'reporting.html', build_js_context(request.user))
def reporting_view(request, *arg, **kwargs): ''' display the reports page show a 404 if the user is not authorised to see the view ''' if is_user_in_groups(REPORT_GROUPS, request.user) is False: raise Http404 return render( request, 'reporting.html', build_js_context(request.user) )
def index(request, *args, **kwargs): """ main view method - this renders the production app page and adds all bootstrap variables required - this is used at / and /corroborator handle formatting of lists outside the view function """ for group in request.user.groups.all(): if group.name == u'data-entry': return redirect('/data-entry/') return render(request, 'new_search.html', build_js_context(request.user))
def index(request, *args, **kwargs): """ main view method - this renders the production app page and adds all bootstrap variables required - this is used at / and /corroborator handle formatting of lists outside the view function """ for group in request.user.groups.all(): if group.name == u'data-entry': return redirect('/data-entry/') return render( request, 'new_search.html', build_js_context(request.user) )