Skip to main content

X-Net Django Email Template

This is the default email template that we use in our company for sending emails with django (registration, password forgot, eg.)

Installation

  1. pip install x_net_django_email_template
  2. Add x_net_django_email_template to INSTALLED_APPS

Usage

When extends the default.html you can overwrite the blocks:

{% extends "email/default.html" %}

{% load html_email i18n %}

{% block title %}Title{% endblock %}
{% block header_title %}Header title{% endblock %}

{% block main %}
  <p>This is an example of text.</p>

  <table role="presentation">
      <tr>
      <td class="button-wrapper">
        <table class="button" role="presentation">
          <tr>
            <td>
              <a href="#">Click me</a>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
{% endblock %}

{% block footer %}
  <p><small>{% trans "This is an automatically generated email, please do not reply to this message." %}</small></p>
{% endblock %}

Templatetags

With the full_static template tag you can insert absolute urls in the email template.

{% load html_email %}
<link rel="stylesheet" href="{% full_static "css/email/html-email.min.css" %}" />

Compatibility

You can inline css to this HTML template with the X-Net Email Inliner. We have test this HTML template with the following email client:

  • Apple Mail 13
  • Outlook 2007
  • Outlook 2010
  • Outlook 2013
  • Outlook 2013 with 120 DPI
  • Outlook 2016 (macOS)
  • Outlook 2016
  • Outlook 2016 with 120 DPI
  • Outlook 2019
  • Outlook 2019 with 120 DPI
  • Outlook Office 365
  • Thunderbird
  • Gmail App
  • Samsung Mail
  • Mail/iOS
  • Outlook Android
  • Outlook iOS
  • Office 365 (Browser)
  • Gmail (Browser)
  • GMX.de (Browser)

Metadata

Release files for x-net-django-email-template 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for x-net-django-email-template 1.0.3
File Size Uploaded
x-net-django-email-template-1.0.3.tar.gz 31.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for x-net-django-email-template 1.0.3
File Interpreter ABI Platform
x_net_django_email_template-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 67.9 kB

Release files / x-net-django-email-template-1.0.3.tar.gz

Download URL x-net-django-email-template-1.0.3.tar.gz
Size 31.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9f7d5ebe8ebcbcfbeeecad11b013f2070890f41972c7ae1f2700f725962f6365
BLAKE2b-256 checksum
How to use checksums
661ae60caebb038cae7e1071c403e5d38c48bbc29f26a9d313ad095967baef70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12

Release files / x_net_django_email_template-1.0.3-py3-none-any.whl

Download URL x_net_django_email_template-1.0.3-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9cc3ce21529f0b71dd762c7e7474eaeb94dc1ada193acc156544a651d7daceb
BLAKE2b-256 checksum
How to use checksums
d635a78430bf298e3f5883e39aa80b57d9d286058293ffa2a77ade6aa4d855a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page