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
310 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,910 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,560 points
1,411 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
5,414 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 4,069 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
3,489 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,520 points
77,584 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
184,590 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP