Insert object's data in a template without "extends".

6 views
Skip to first unread message

Maurizio Mastria

unread,
Feb 19, 2019, 7:44:20 AM2/19/19
to Django users
Hi, I have a problem.
How can I insert a data in a template? Not by "extends"!
Thanks!

base.html

{% load static %}<html>
   
<head>
   
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="{% static 'css/base.css' %}">
<link href="https://fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext" rel="stylesheet" type="text/css">
   
</head>
<header>
    <img src="{### get_object(Image, pk=1) ###}"/>     <--- Here                
</header>
    <body>
    {% block content %}
    {% endblock %}
    </
body>
</html>

Reply all
Reply to author
Forward
0 new messages