0

I have in version of my software (settings.release=1.0.14) and I want to show this info in django admin header under or after the product logo, but no idea how to do it.

My base_site.html is:

{% extends "admin/base.html" %}
{% load static %}

{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block branding %}
<h1 id="site-name">
    <a href="{% url 'admin:index' %}">
        <img src="{% static 'lumbara.png' %}" height="50px" />
    </a>
</h1>

{% endblock %}

{% block extrastyle %}

<style>

.module h2, .module caption, .inline-group h2,#header
{
    /*margin: 0;*/
    /*padding: 2px 2px 2px 2px;*/
    /*font-size: 12px;*/
    /*text-align: left;*/
    /*font-weight: bold;*/
    background: #006400  url(../img/default-bg.gif) top left repeat-x;
    color: #fff;
}

</style>
{% endblock %}

{% block nav-global %}{% endblock %}
Colateral
  • 1,736
  • 2
  • 18
  • 22

1 Answers1

1

You have to write your own context_processors which returns a dictionary with your release variable. Then add it to the TEMPLATE settings, and you can use this variable in your templates - look at this answer for more info.

TymoteuszLao
  • 844
  • 1
  • 5
  • 16