Esempio n. 1
0
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))
Esempio n. 2
0
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)
    )
Esempio n. 3
0
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))
Esempio n. 4
0
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)
    )