I would like to click on a hyperlink in my Django template that navigates to an arbitrary URL such as file:///C:/my_dir/folder, this URL works if I paste it directly into the address field of a browser, but does nothing if I click on a hyperlink in my Django app that resolves to that URL. I've also tried implementing it using the template - view protocol for Django but in my view neither of these seem to work return HttpResponse(html_filepath) or return render(request, html_filepath, context).
Returning HttpResponse simply displays the text file:///C:/my_dir/folder in my browser window at URL http://127.0.0.1:8000/my_app/my_dir/folder//result_filepath/.
Returning render gives the following error:
OSError at /my_app/C:/my_dir/folder//result_filepath/ [Errno 22] Invalid argument: 'C:\Users\user\Documents\my_app\my_source_code\my_tool\mysite\templates\file:\C:/my_dir/folder'
My goal is to see the folder contents at the URL file:///C:/my_dir/folder