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)
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)
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)
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)