Answer the question
In order to leave comments, you need to log in
Is it possible to display media files from arbitrary directories on a PC using Django in the browser?
Good day everyone! As an independent study of Django/Python, I'm thinking of a small test project: something like a home local "movie search" - a movie database with the ability to view movies from a local disk. Access will only be on the machine running the Django webserver, the movie video files will be on the same machine.
The question is: is it possible in principle to display video files on web pages issued by Django if they are not in the /static directory of the project, but in different directories on the PC, and at the same time it is undesirable to move them to the project directory? Reading the settings.py documentation only raised more questions and doubts that this could even be done. The problem I see is that if you just specify in the tagvideo is a link to a local file, the browser will not download anything from the disk for security reasons and the browser needs to give something through the web server. How I imagine how everything should look like:
Directories on the computer:
D:\Films # Здесь лежат видеофайлы
C:\Torrents # Здесь тоже фильмы
C:\MyProject # А здесь проект на Django и БД
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question