Example #1
0
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)
Example #2
0
def list_files(request):
    path = request.GET["path"]
    file_list = files.list(path)
    return JsonResponse(file_list, safe=False)