Skip to main content

A Django application with templates for emails.

Project description

django-epfl-mail

Build Status Coverage Status PyPI version PyPI Python version

A Django application with templates for emails.

Requirements

  • Python 3.7 or later
  • Django 2.2, 3.2, 4.2 or 5.2

Installation

Installing from PyPI is as easy as doing:

pip install django-epfl-mail

Documentation

Setup

Add 'django_epflmail' to your INSTALLED_APPS setting.

INSTALLED_APPS = [
    ...
    'django_epflmail',
]

Example template

from django.core.mail.message import EmailMessage
from django.template.loader import render_to_string

html = render_to_string("example.html", {"APP_TITLE": "Example"})
email = EmailMessage(
    "Email Example", html, "from@example.com", ["to@example.com"]
)
email.send()
{% extends "epflmail/default.html" %}
{% load i18n %}

{% block title %}
Email Example
{% endblock %}

{% block online %}
  {% with ONLINE_VERSION_LINK="https://example.com" %}
    {% include 'epflmail/includes/online.inc.html'%}
  {% endwith %}
{% endblock %}

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

{% block unsubscribe %}
  <a href="https://example.com">Unsubscribe link</a>
{% endblock %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_epfl_mail-2.2.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_epfl_mail-2.2.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file django_epfl_mail-2.2.0.tar.gz.

File metadata

  • Download URL: django_epfl_mail-2.2.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_epfl_mail-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9213377690ba494914eeac4d785815e20f2168652a9ebf0e97c4fd7fa28312ff
MD5 aa06593f153f74e5ee24bc5bb675fb4f
BLAKE2b-256 ba86c4a49ae6d9fb0a497234b0c23cb57363128d013cfefbcbe107dd50a3af7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_epfl_mail-2.2.0.tar.gz:

Publisher: release.yml on epfl-si/django-epfl-mail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_epfl_mail-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_epfl_mail-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b41b5054fda8030c4a99fe6a8fa50b8b69788017fdcd6905aa80a9d05e47b238
MD5 e0c49a2ace6e05b1cc678ab0537274a7
BLAKE2b-256 a5c2ed1680aa4f590d095e99caaa4112cbe8fd3fbc79582182a6e9cb408f3371

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_epfl_mail-2.2.0-py3-none-any.whl:

Publisher: release.yml on epfl-si/django-epfl-mail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page