Django - extend admin template

2

could someone indicate the best way to extend the django template? and how best to share a template with the admin and site area.

I'm using django version 1.8.6 and django-bootstrap3

Thank you.

    
asked by anonymous 21.11.2015 / 22:12

1 answer

1

Following the reply from this post , you you can use the djangosnippets loader template and extend the admin template in a very easy way. See the example:

{% extends "admin:admin/index.html" %}

{% block sidebar %}
    {{block.super}}
    <div>
        <h1>Extra links</h1>
        <a href="/admin/extra/">My extra link</a>
    </div>
{% endblock %}

I do not know if this is the best way, but it's one of the ways. I saw the post is old, but I think the answer is still valid. Hugs

    
27.09.2017 / 22:08