Answer the question
In order to leave comments, you need to log in
It's not clear how the template expands in django, what could be the problem?
Good day.
I'm templating html and came across an unexpected problem: the content is generated incorrectly from the parent template.
Here is base_admin.html
<!DOCTYPE html>
<html lang="ru-RU">
{% load staticfiles %}
{% block head %}
<head>
{% block meta %}
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="description" content=""/>
<meta name="author" content=""/>
{% endblock %}
{% block title %}
<title>Free Responsive Admin Theme - ZONTAL</title>
{% endblock %}
{% block css %}
<!-- BOOTSTRAP CORE STYLE -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"/>
<!-- FONT AWESOME ICONS -->
<link href="{% static 'css/admin/font-awesome.css' %}" rel="stylesheet"/>
<!-- CUSTOM STYLE -->
<link href="{% static 'css/admin/admin.css' %}" rel="stylesheet"/>
{% endblock %}
</head>
{% endblock %}
{% block body %}
<body>
<!-- LOGO HEADER END-->
{% block menu %}
<section class="menu-section">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="navbar-collapse collapse ">
<ul id="menu-top" class="nav navbar-nav navbar-right">
<li><a class="menu-top-active" href="admin_news.html">Dashboard</a></li>
<li><a href="ui.html">UI Elements</a></li>
<li><a href="table.html">Data Tables</a></li>
<li><a href="forms.html">Forms</a></li>
<li><a href="login.html">Login Page</a></li>
<li><a href="blank.html">Blank Page</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
{% endblock %}
<!-- MENU SECTION END-->
{% block content %}
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-12">
<h4 class="page-head-line">Dashboard</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success">
This is a simple admin template that can be used for your small project or may be large
projects.
This is free for personal and commercial use.
</div>
</div>
</div>
<div class="col-md-12">
<!-- Kitchen Sink -->
<div class="panel panel-default">
<div class="panel-heading">
Новости
</div>
<div class="panel-body">
{% if news_list %}
<div class="table-responsive">
{% include 'adminApp/inc-news_list.html' %}
</div>
{% else %}
<p> Error! Objects not found.</p>
{% endif %}
</div>
</div>
<!-- End Kitchen Sink -->
</div>
</div>
</div>
{% endblock %}
<!-- CONTENT-WRAPPER SECTION END-->
{% block footer %}
<footer>
<div class="container">
<div class="row">
<div class="col-md-12">
© 2015 YourCompany | By : <a href="http://www.designbootstrap.com/"
target="_blank">DesignBootstrap</a>
</div>
</div>
</div>
</footer>
{% endblock %}
{% block js %}
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME -->
<script src="{% static 'js/jquery-3.1.1.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
{% endblock %}
</body>
{% endblock %}
</html>
{% extends 'adminApp/base_admin.html'%}
Answer the question
In order to leave comments, you need to log in
In general, the errors are divided in half: 1. Due to the fact that it was not registered - I entered it with pens into the child template; 2. Because of BOMs. It was decided by re-creating the files in the IDE.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question