Answer the question
In order to leave comments, you need to log in
How to embed html page from specified folder in Django (page not in project folder)?
The question is as follows:
There is a separate folder in which different html files with analytics will be generated.
It is necessary to create a page in Django on which there will be links to all these pages.
and by clicking on the link the page should open (well, of course)
Tell me, please!
Answer the question
In order to leave comments, you need to log in
Put it in a folder In django, do something like my_files
= os.listdir('<path to daddy>') - and display this list by adding some url
my_files = os.listdir('<путь до папочки>')
context['links'] = [f'/некий урл/{my_file}' for my_file in my_files]
location /некий урл
{
alias /путь/до/папки;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question