title: Django messages: how to change html structure?
body: <p>So I've got some really specific styling constraints for the messages, and I've pushed ::before and ::after as far as they will go. Beyond that what I really need is for the text of the message to be enclosed in a span tag, ideally with a settable class (it's just dumped in the div which is not great to begin with).</p>
  
  <p>Is there any setting in Django, or any place I can go to restructure the html? I can't find any documentation for this (surely this is not an uncommon thing to customise).</p>
  
  <p>The alternative is to use js, but I'd prefer to avoid cutting and pasting elements and content when it should be something that should be customisable.</p>
  
  <p>What I've got is:</p>
  
  <pre><code>&lt;div class="messages"&gt;
      &lt;div class="alert alert-success alert-dismissable fade show"&gt;
          &lt;a href="#" class="close" data-dismiss="alert" aria-label="close"&gt;x&lt;/a&gt;
          [message text]
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>&lt;div class="messages"&gt;
      &lt;div class="alert alert-success alert-dismissable fade show"&gt;
          &lt;a href="#" class="close" data-dismiss="alert" aria-label="close"&gt;
              &lt;i class="close-icon"&gt;&lt;/i&gt;
          &lt;/a&gt;
          &lt;span&gt;[message text]&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In views.py I'm using <code>SuccessMessageMixin</code> in various places.</p>