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,910 points
87 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,850 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,540 points
797 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,040 points
4,591 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,761 views
0 votes
1 answer
+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,790 points
2,058 views
0 votes
4 answers

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

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

answered Dec 16, 2020 in Python by Roshni
• 10,500 points
65,071 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,040 points
90,773 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP