Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Images In Django

{% load static %}
<!DOCTYPE html>
    <head>

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
        <link rel="stylesheet" href="{% static 'css/blog.css' %}">

   
    </head>
<body>second second
<div class="container">
this now works
<img src="{% static 'images/myimage.jpg' %}"/>
</div>  
    </html>
    #almost the same as stylesheets except different folder name. The folder names were self made.
 
PREVIOUS NEXT
Tagged: #Images #In #Django
ADD COMMENT
Topic
Name
7+4 =