Template

Configurations

Créer un template

Afficher un template

Via le Router

Via une View

Récupérer le contenu d’un template


DTL

Afficher une variable

Appliquer des Filtres

Échappement HTML

Assigner une Variable

Commentaires

Conditions

Boucles

Variables spéciales

Cycles

Liens

Endpoint

Fichier statique

Traductions

Héritage

core/templates/core/emails/base.html

    {% load static %}
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="width=device-width" />
        <title>MON PROJET</title>

        <style type="text/css">
          body {
            height: 100% !important;
            margin: 0;
            padding: 0;
            width: 100% !important;
            background-color: #f2f4f7;
          }
          table{
            border-collapse: collapse;
          }
          img, a img {
            border: 0;
            outline: none;
            text-decoration: none;
          }
          h1, h2, h3, h4, h5, h6{
            margin: 0;
            padding: 0;
            font-weight: normal;
          }
          p {
            margin: 1em 0;
            line-height: 1.46;
          }

          #main {
            font-family: Verdana, Geneva, sans-serif;
            color: #4c4c4c;
          }
          #main > tbody > tr > td {
            padding-bottom: 25px;
          }
          #header {
            padding-top: 35px;
          }
          #article table td {
            padding: 25px;
            border-radius: 3px;
            background-color: #FFF;
          }
          #article h3 {
            font-size: 24px;
            color: #2F3133;
          }
        </style>
        {% block css %}{% endblock %}
        <!--
          Outlook Conditional CSS

          These two style blocks target Outlook 2007 & 2010 specifically, forcing
          columns into a single vertical stack as on mobile clients. This is
          primarily done to avoid the 'page break bug' and is optional.

          More information here:
          http://templates.mailchimp.com/development/css/outlook-conditional-css
        -->
        <!--[if mso 12]>
          <style type="text/css">
            .flexibleContainer{display:block !important; width:100% !important;}
          </style>
        <![endif]-->
        <!--[if mso 14]>
          <style type="text/css">
            .flexibleContainer{display:block !important; width:100% !important;}
          </style>
        <![endif]-->
      </head>
      <body>
        <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="main">
          <!-- HEADER -->
          <tr>
            <td align="center" valign="top" id="header">
              <table border="0" cellpadding="0" cellspacing="0" width="600">
                <tbody>
                  <tr>
                    <td align="center" valign="top">
                      <table align="left" border="0" cellpadding="0" cellspacing="0" width="200">
                        <tr>
                          <td align="left" valign="top">
                            <!--logo-->
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
          <!-- CONTENT -->
          <tr>
            <td align="center" valign="top" id="article">
              <table border="0" cellpadding="0" cellspacing="0" width="650">
                <tbody>
                  <tr>
                    <td align="left" valign="top">
                      {% block content %}{% endblock %}
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
          <!-- FOOTER -->
          {% block footer_tr %}{% endblock %}
        </table>
      </body>
      <br /><br />
    </html>

  
core/emails/admin/new_admin.html

    {% extends "core/emails/base.html" %}
    {% load i18n %}

    {% block content %}
        <h3>{{ subject }}</h3>

        <p>Nous vous informons qu'un utilisateur vient de faire une demande de création de compte <b>administrateur</b>:</p>
        <ul>
            <li><b>{{ user_fullname }}</b></li>
            <li>{{ user_email }}</li>
        </ul>

        <p>
            Vous pouvez vous rendre sur cette page pour valider ou refuser son compte:
            <a href="{{ link }}">{{ link }}</a>
        </p>

        <p>
            Merci,
            L'équipe {{ site_name }}
        </p>
    {% endblock %}
  
core/emails/admin/new_admin.txt

    {% load i18n %}
    {% autoescape off %}

        Nous vous informons qu'un utilisateur vient de faire une demande de création de compte administrateur:

            Nom et prénom: {{ user_fullname }}
            Email: {{ user_email }}

        Vous pouvez vous rendre sur cette page pour valider ou refuser son compte: {{ link }}

        Merci,
        L'équipe {{ site_name }}
    {% endautoescape %}
  

Inclusions


Tags personnalisés

Avec load

Sans load