Example #1
0
def logo_display(request, id):
    directory = get_object_or_404(Directory, pk=id)

    if not has_view_perm(request.user, "directories.view_directory", directory):
        raise Http403

    return file_display(request, directory.logo.name)
Example #2
0
def display_header_image(request, id):
    page = get_object_or_404(Page, pk=id)

    if not has_view_perm(request.user, "[pages.view_page", page):
        raise Http403

    return file_display(request, page.header_image.file.name)
Example #3
0
def display_header_image(request, id):
    page = get_object_or_404(Page, pk=id)

    if not has_view_perm(request.user, '[pages.view_page', page):
        raise Http403

    return file_display(request, page.header_image.file.name)
Example #4
0
def logo_display(request, id):
    directory = get_object_or_404(Directory, pk=id)

    if not has_view_perm(request.user, 'directories.view_directory',
                         directory):
        raise Http403

    return file_display(request, directory.logo.name)