Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

How to display the image in Django HTML Page:-


Django provides two different ways to put the image.

1 under app:-

 create static/img folder under the current app and put an image

use <img> tag of html and write path

<img src="/static/img/img3.jpg" width="500" height="500" />


2 under application:-

If we want to manage image under application then we can create media director and write the image into this and provide a media path

<img src="media/../img3.jpg" width="500" height="500" />

 We can put CSS, Image, JS, BootStrap, API, and other resources in the same way.


 

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post