How to give local path instead of media URL

0 votes
I am trying to load pdf in iframe by giving path of pdf. It shows pdf well by opening html page but as soon as I try to open same page in Django project the pdf is not showing in page.
How to give local path instead of media URL?
Nov 12, 2020 in Python by anonymous
• 8,890 points
60 views

1 answer to this question.

0 votes

If u are using iframe, you can manually set src for iframe using javascript in Frontend size.

In this case, Django won't do anything because at the time of template rendering iframe was not active.

answered Nov 12, 2020 by Gitika
• 65,950 points

Related Questions In Python

0 votes
1 answer

How to zip with a list output in Python instead of a tuple output?

Good question - Considering that you are ...READ MORE

answered Feb 7, 2019 in Python by Nymeria
• 3,520 points
613 views
0 votes
1 answer

How to find path of Python interpreter?

In Python, the sys module has System-specific ...READ MORE

answered Jul 26, 2019 in Python by Arvind
• 3,000 points
4,008 views
0 votes
0 answers
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,362 views
0 votes
0 answers
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,769 views
0 votes
4 answers

How to print objects of class using print function in Python?

>>> class Test: ... ...READ MORE

answered Dec 15, 2020 in Python by Roshni
• 10,480 points
55,917 views
0 votes
4 answers

how to sort a list of numbers without using built-in functions like min, max or any other function?

Yes it is possible. You can refer ...READ MORE

answered Jun 27, 2019 in Python by Arvind
• 3,000 points
56,632 views