Trying to add custom page into the admin. I want this page to have the same header and upper menu like any other page in admin
from django-admin-tools
.
Everything seems to be ok except the welcome section.
This is how it should look like
As you can see there is missing the upper right section.
This is my base template:
{% extends "admin:admin/app_index.html" %}
{% load django_tables2 %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.6.5/datepicker.min.css">
{% endblock %}
{% block extrahead %}
{{ block.super }}
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.6.5/datepicker.min.js"></script>
<script>
$(document).ready(function () {
$(".datepicker").datepicker(
{
format: 'dd.mm.yyyy'
}
);
})
</script>
{% endblock %}
{% block content %}
{{ block.super }}
{% block render_home_table %}
<section class="home_table_section">
<button class="copy_table_to_cb">Clipboard</button>
{% render_table home_table %}
</section>
{% endblock %}
{% block render_away_table %}
<button class="copy_table_to_cb">Clipboard</button>
<section class="away_table_section">
{% render_table away_table %}
</section>
{% endblock %}
{% endblock %}
How to fix this? Do I have to extend another template?