1. David Jean Louis
  2. django-admin-tools
  3. Issues
Issue #140 new

base.html: put admin messages in a {% block %} tag

created an issue

If admin messages were concluded in a {% block %} tag, this will allow for an easy admin messages customization. This is how it is done in built-in django templates, but not in django-admin-tools base.html template:

    {% block messages %}
        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}</ul>
        {% endif %}
    {% endblock messages %}

So, one can extend this template and customize just the messages block, instead of copy-pasting the whole template. Django-admin-tools should take the same approach.