I want to replace dynamically "Site administration" by a custom string in my admin.
I've already overridden "base.html" for some other purpose, but now I need to pass a variable to this template to replace {{ title }}
in
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
I've seen from this question that a variable can be passed to the change list template by overriding changelist_view
and adding an extra_context
in the model admin, but how can I pass an extra context to the "main" page of the admin"?