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,880 points
36 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,870 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
516 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
3,505 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,058 views
0 votes
0 answers
+4 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,570 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,440 points
49,120 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
40,477 views