def index(request): path = get_path(request) context = { "files": files.list(path), "path": path, "view": get_view_content(request) } return render(request, 'browser/index.html', context)
def list_files(request): path = request.GET["path"] file_list = files.list(path) return JsonResponse(file_list, safe=False)