L
L
Lopus2017-08-07 12:36:57
Django
Lopus, 2017-08-07 12:36:57

How to add variable to django admin template?

I want to add a variable to the list of django admin objects before listing.
Found the possibility of overriding change_list.html.
Redefined content:

{% block content %}
    {{ my_var }}
    {{ block.super }}
{% endblock %}

It remains to add my_var to the template. But where is the best place to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question