forked from beba/foerderbarometer
WM-18: improved mails & added full form data
This commit is contained in:
parent
35627d2764
commit
f5c9b0c76c
|
|
@ -1,60 +1,26 @@
|
||||||
<html>
|
<html lang="de">
|
||||||
<body>
|
<body>
|
||||||
<p>Hallo Team Community-Konferenzen & Förderung,</p>
|
<p>Hallo Team Community-Konferenzen & Förderung,</p>
|
||||||
|
|
||||||
<p>es gibt eine neue Anfrage von {{ data.realname }}.</p>
|
<p>es gibt eine neue Anfrage von {{ data.realname }}.</p>
|
||||||
|
|
||||||
<p>{{ data.username|default:data.realname }} ({{ data.email }}) fragt an: {{ data.type_label|striptags }}</p>
|
<p>{{ data.username|default:data.realname }} ({{ data.email }}) fragt an: {{ type_label }}</p>
|
||||||
|
|
||||||
{% if data.choice in data.grant %}<br>
|
<p>
|
||||||
Vorraussichtliche Kosten: {{data.cost}}<br>
|
{% for label, value in form_data.items %}
|
||||||
Anmerkungen: {{data.notes}} {% endif %} {% if data.choice in data.domain %}<br>
|
{{ label }}: {{ value }} <br />
|
||||||
Domain: <a href="{{data.domain}}">{{data.domain}}</a><br>
|
{% endfor %}
|
||||||
Adressenbestandteil: {{data.address}} <br> {% endif %} {% if data.choice == 'BIB' %}
|
</p>
|
||||||
Bibliothek: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} <br> {% elif data.choice == 'ELIT' %}
|
|
||||||
Datenbank: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} <br> {% elif data.choice == 'SOFT' %}
|
|
||||||
Software: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} <br> {% elif data.choice == 'IFG'%}
|
|
||||||
Anfrage-URL: <a href="{{data.url}}">{{data.url}}</a> <br> {% elif data.choice == 'LIT'%}
|
|
||||||
Info zum Werk: {{data.info}}<br>
|
|
||||||
Bezugsquelle: {{data.source}} <br> {% elif data.choice == 'MAIL'%}
|
|
||||||
Adressenbestandteil frei gewählt: {{data.other}} <br> {% elif data.choice == 'VIS'%}
|
|
||||||
Wikimedia-Projekt: {{data.project}}<br>
|
|
||||||
Persönliche Daten: {{data.data}}<br>
|
|
||||||
Variante: {{data.variant}}<br>
|
|
||||||
Sendungsadrese: {{data.send_to}} <br> {% endif %}
|
|
||||||
|
|
||||||
<p>Zum Eintrag in der Förderdatenbank:
|
<p>Zum Eintrag in der Förderdatenbank: <a href="{{ urls.admin }}">{{ urls.admin }}</a></p>
|
||||||
{% if data.choice == 'BIB' %}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
{% if urls.authorize %}
|
||||||
{% elif data.choice == 'ELIT'%}
|
<p>Zum Genehmigen hier klicken: <a href="{{ urls.authorize }}">{{ urls.authorize }}</a></p>
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'LIT'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/literature/{{data.pk}}/change">{{data.url_prefix}}/admin/input/literature/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'MAIL'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/email/{{data.pk}}/change">{{data.url_prefix}}/admin/input/email/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'IFG'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/ifg/{{data.pk}}/change">{{data.url_prefix}}/admin/input/ifg/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'LIST'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/list/{{data.pk}}/change">{{data.url_prefix}}/admin/input/list/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'TRAV'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/travel/{{data.pk}}/change">{{data.url_prefix}}/admin/input/travel/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'SOFT'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'VIS'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/businesscard/{{data.pk}}/change">{{data.url_prefix}}/admin/input/businesscard/{{data.pk}}/change</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Zum Genehmigen hier klicken:
|
{% if urls.deny %}
|
||||||
<a href="{{data.url_prefix}}{% url 'authorize' data.choice data.pk %}">{{data.url_prefix}}{% url 'authorize' data.choice data.pk %}</a>
|
<p>Zum Ablehnen hier klicken: <a href="{{ urls.deny }}">{{ urls.deny }}</a></p>
|
||||||
</p>
|
{% endif %}
|
||||||
|
|
||||||
<p>Zum Ablehnen hier klicken:
|
|
||||||
<a href="{{data.url_prefix}}{% url 'deny' data.choice data.pk %}">{{data.url_prefix}}{% url 'deny' data.choice data.pk %}</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,12 @@
|
||||||
Hallo Team Communitys und Engagement,
|
Hallo Team Community-Konferenzen & Förderung,
|
||||||
|
|
||||||
es gab einen neuen Antrag von {{data.realname}}.
|
es gibt eine neue Anfrage von {{ data.realname }}.
|
||||||
|
|
||||||
Der Nutzer mit dem Username {{data.username}} ({{data.email}}) fragt ein_e {{data.type_label|striptags}} an.
|
{{ data.username|default:data.realname }} ({{ data.email }}) fragt an: {{ type_label }}
|
||||||
{% if data.choice in data.grant %}
|
|
||||||
Vorraussichtliche Kosten: {{data.cost}}
|
|
||||||
Anmerkungen: {{data.notes}} {% endif %} {% if data.choice in data.domain %}
|
|
||||||
Domain: {{data.domain}}
|
|
||||||
Adressenbestandteil: {{data.address}} {% endif %} {% if data.choice == 'BIB' %}
|
|
||||||
Bibliothek: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'ELIT' %}
|
|
||||||
Datenbank: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'SOFT' %}
|
|
||||||
Software: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'IFG'%}
|
|
||||||
Anfrage-URL: {{data.url}} {% elif data.choice == 'LIT'%}
|
|
||||||
Info zum Werk: {{data.info}}
|
|
||||||
Bezugsquelle: {{data.source}} {% elif data.choice == 'MAIL'%}
|
|
||||||
Adressenbestandteil frei gewählt: {{data.other}} {% elif data.choice == 'VIS'%}
|
|
||||||
Wikimedia-Projekt: {{data.project}}
|
|
||||||
Persönliche Daten: {{data.data}}
|
|
||||||
Variante: {{data.variant}}
|
|
||||||
Sendungsadrese: {{data.send_to}} {% endif %}
|
|
||||||
|
|
||||||
Zum Eintrag in der Förderdatenbank:
|
{% for label, value in form_data.items %}{{ label }}: {{ value }}
|
||||||
{% if data.choice == 'BIB' %}
|
{% endfor %}
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'ELIT'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'LIT'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/literature/{{data.pk}}/change">{{data.url_prefix}}/admin/input/literature/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'MAIL'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/email/{{data.pk}}/change">{{data.url_prefix}}/admin/input/email/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'IFG'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/ifg/{{data.pk}}/change">{{data.url_prefix}}/admin/input/ifg/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'LIST'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/list/{{data.pk}}/change">{{data.url_prefix}}/admin/input/list/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'TRAV'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/travel/{{data.pk}}/change">{{data.url_prefix}}/admin/input/travel/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'SOFT'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/library/{{data.pk}}/change">{{data.url_prefix}}/admin/input/library/{{data.pk}}/change</a>
|
|
||||||
{% elif data.choice == 'VIS'%}
|
|
||||||
<a href="{{data.url_prefix}}/admin/input/businesscard/{{data.pk}}/change">{{data.url_prefix}}/admin/input/businesscard/{{data.pk}}/change</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
Zum Eintrag in der Förderdatenbank: {{ urls.admin }}
|
||||||
Zum Genehmigen hier klicken: {{data.url_prefix}}{% url 'authorize' data.choice data.pk %}
|
{% if urls.authorize %}Zum Genehmigen hier klicken: {{ urls.authorize }}{% endif %}
|
||||||
|
{% if urls.deny %}Zum Ablehnen hier klicken: {{ urls.deny }}{% endif %}
|
||||||
Zu Ablehnen hier klicken: {{data.url_prefix}}{% url 'deny' data.choice data.pk %}
|
|
||||||
|
|
||||||
Stets zu Diensten, Deine Förderdatenbank
|
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,14 @@
|
||||||
<html>
|
<html lang="de">
|
||||||
<body>
|
<body>
|
||||||
<p>Hallo {{ data.username|default:data.realname }},</p>
|
<p>Hallo {{ applicant_name }},</p>
|
||||||
|
|
||||||
<p>vielen Dank für deine Anfrage ({{ data.type_label|striptags }}), die bei uns eingegangen ist.</p>
|
<p>vielen Dank für deine Anfrage ({{ type_label }}), die bei uns eingegangen ist.</p>
|
||||||
|
|
||||||
Dies ist eine automatisch generierte E-Mail. Im Folgenden findest du deine Formulareingaben nochmals zu deiner Übersicht:<br>
|
Dies ist eine automatisch generierte E-Mail. Im Folgenden findest du deine Formulareingaben nochmals zu deiner Übersicht:<br>
|
||||||
{% if data.choice in data.grant %}<br>
|
|
||||||
Vorraussichtliche Kosten: {{data.cost}}<br>
|
{% for label, value in form_data.items %}
|
||||||
Anmerkungen: {{data.notes}} {% endif %} {% if data.choice in data.domain %}<br>
|
{{ label }}: {{ value }} <br />
|
||||||
Domain: <a href="{{data.domain}}">{{data.domain}}</a><br>
|
{% endfor %}
|
||||||
Adressenbestandteil: {{data.address}} {% endif %} {% if data.choice == 'BIB' %}<br>
|
|
||||||
Bibliothek: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'ELIT' %}<br>
|
|
||||||
Datenbank: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'SOFT' %}<br>
|
|
||||||
Software: {{data.library}}<br>
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'IFG'%}<br>
|
|
||||||
Anfrage-URL: <a href="{{data.url}}">{{data.url}}</a> {% elif data.choice == 'LIT'%}<br>
|
|
||||||
Info zum Werk: {{data.info}}<br>
|
|
||||||
Bezugsquelle: {{data.source}} {% elif data.choice == 'MAIL'%}<br>
|
|
||||||
Adressenbestandteil frei gewählt: {{data.other}} {% elif data.choice == 'VIS'%}<br>
|
|
||||||
Wikimedia-Projekt: {{data.project}}<br>
|
|
||||||
Persönliche Daten: {{data.data}}<br>
|
|
||||||
Variante: {{data.variant}}<br>
|
|
||||||
Sendungsadrese: {{data.send_to}} {% endif %}<br>
|
|
||||||
|
|
||||||
<p>Das Team Community-Konferenzen & Förderung wird sich um deine Anfrage kümmern und sich in den nächsten Tagen bei dir melden. Wenn du Fragen hast, wende dich gern jederzeit an <a href="mailto:community@wikimedia.de">community@wikimedia.de</a>.</p>
|
<p>Das Team Community-Konferenzen & Förderung wird sich um deine Anfrage kümmern und sich in den nächsten Tagen bei dir melden. Wenn du Fragen hast, wende dich gern jederzeit an <a href="mailto:community@wikimedia.de">community@wikimedia.de</a>.</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,22 @@
|
||||||
Hallo {{data.realname}},
|
Hallo {{ applicant_name }},
|
||||||
|
|
||||||
wir haben Deine Anfrage ({{data.type_label|striptags}}) erhalten.
|
vielen Dank für deine Anfrage ({{type_label}}), die bei uns eingegangen ist.
|
||||||
{% if data.choice in data.grant %}
|
|
||||||
Vorraussichtliche Kosten: {{data.cost}}
|
|
||||||
Anmerkungen: {{data.notes}} {% endif %} {% if data.choice in data.domain %}
|
|
||||||
Domain: {{data.domain}}
|
|
||||||
Adressenbestandteil: {{data.address}} {% endif %} {% if data.choice == 'BIB' %}
|
|
||||||
Bibliothek: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'ELIT' %}
|
|
||||||
Datenbank: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'SOFT' %}
|
|
||||||
Software: {{data.library}}
|
|
||||||
Dauer: {{data.duration}} {% elif data.choice == 'IFG'%}
|
|
||||||
Anfrage-URL: {{data.url}} {% elif data.choice == 'LIT'%}
|
|
||||||
Info zum Werk: {{data.info}}
|
|
||||||
Bezugsquelle: {{data.source}} {% elif data.choice == 'MAIL'%}
|
|
||||||
Adressenbestandteil frei gewählt: {{data.other}} {% elif data.choice == 'VIS'%}
|
|
||||||
Wikimedia-Projekt: {{data.project}}
|
|
||||||
Persönliche Daten: {{data.data}}
|
|
||||||
Variante: {{data.variant}}
|
|
||||||
Sendungsadrese: {{data.send_to}} {% endif %}
|
|
||||||
|
|
||||||
Das Team Comunitys und Engagement wird sich um die Bearbeitung deiner Anfrage kümmern
|
{% for label, value in form_data.items %}{{ label }}: {{ value }}
|
||||||
und sich in den nächsten Tagen bei dir melden. Solltest du Rückfragen haben,
|
{% endfor %}
|
||||||
wende dich gern an community@wikimedia.de.
|
|
||||||
|
|
||||||
Viele Grüße, dein freundliches aber komplett unmenschliches automatisches
|
Das Team Community-Konferenzen & Förderung wird sich um deine Anfrage kümmern und sich in den nächsten Tagen bei dir melden. Wenn du Fragen hast, wende dich gern jederzeit an community@wikimedia.de.
|
||||||
Formularbeantwortungssystem.
|
|
||||||
|
--
|
||||||
|
|
||||||
|
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23–24 | 10963 Berlin
|
||||||
|
Zentrale: +49 30 5771162-0
|
||||||
|
https://wikimedia.de
|
||||||
|
|
||||||
|
Unsere Vision ist eine Welt, in der alle Menschen am Wissen der Menschheit teilhaben, es nutzen und mehren können. Helfen Sie uns dabei!
|
||||||
|
https://spenden.wikimedia.de
|
||||||
|
|
||||||
|
Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Charlottenburg, VR 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. Geschäftsführende Vorständin: Franziska Heine.
|
||||||
|
|
||||||
|
Datenschutzerklärung:
|
||||||
|
Soweit Sie uns personenbezogene Daten mitteilen, verarbeiten wir diese Daten gemäß unserer Datenschutzerklärung (https://www.wikimedia.de/datenschutz/).
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,16 @@
|
||||||
|
import datetime
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from smtplib import SMTPException
|
from smtplib import SMTPException
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
|
from django.forms import ChoiceField, BoundField, Field
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render, redirect
|
||||||
from django.http import HttpResponse, Http404
|
from django.http import HttpResponse, Http404
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.utils.choices import flatten_choices
|
||||||
|
from django.utils.formats import date_format
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.http import url_has_allowed_host_and_scheme
|
from django.utils.http import url_has_allowed_host_and_scheme
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
@ -14,6 +21,7 @@ from django.views.generic import TemplateView
|
||||||
from django.views.generic.edit import FormView
|
from django.views.generic.edit import FormView
|
||||||
from django.utils.html import strip_tags
|
from django.utils.html import strip_tags
|
||||||
|
|
||||||
|
from input.utils.admin import admin_url_name
|
||||||
from input.utils.mail import build_email, collect_and_attach
|
from input.utils.mail import build_email, collect_and_attach
|
||||||
|
|
||||||
from .forms import (
|
from .forms import (
|
||||||
|
|
@ -43,6 +51,7 @@ from .models import (
|
||||||
TYPE_SOFT,
|
TYPE_SOFT,
|
||||||
TYPE_TRAV,
|
TYPE_TRAV,
|
||||||
TYPE_VIS,
|
TYPE_VIS,
|
||||||
|
Project,
|
||||||
)
|
)
|
||||||
|
|
||||||
HELP_TEXTS = {
|
HELP_TEXTS = {
|
||||||
|
|
@ -286,19 +295,9 @@ class ApplicationView(FormView):
|
||||||
def send_mail(self, obj, data):
|
def send_mail(self, obj, data):
|
||||||
# Prepare minimal mail context and send mails
|
# Prepare minimal mail context and send mails
|
||||||
|
|
||||||
type_label_html = self.type_info.label
|
context = self.get_email_context(obj, data)
|
||||||
type_label_plain = strip_tags(type_label_html)
|
|
||||||
|
|
||||||
data['pk'] = obj.pk
|
|
||||||
data['url_prefix'] = settings.EMAIL_URL_PREFIX
|
|
||||||
data['type_label'] = type_label_html
|
|
||||||
|
|
||||||
context = {'data': data}
|
|
||||||
|
|
||||||
applicant_name = self.get_recipient_name(obj, data)
|
|
||||||
applicant_subject = 'Deine Förderanfrage bei Wikimedia Deutschland'
|
applicant_subject = 'Deine Förderanfrage bei Wikimedia Deutschland'
|
||||||
|
staff_subject = 'Anfrage {type_label} von {applicant_name}'.format(**context)
|
||||||
staff_subject = f'Anfrage {type_label_plain} von {applicant_name}'
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.send_email('applicant', 'ifg_volunteer_mail', applicant_subject, data['email'], context)
|
self.send_email('applicant', 'ifg_volunteer_mail', applicant_subject, data['email'], context)
|
||||||
|
|
@ -310,6 +309,57 @@ class ApplicationView(FormView):
|
||||||
obj.delete()
|
obj.delete()
|
||||||
return HttpResponse('Error in sending mails (probably wrong address?). Data not saved!')
|
return HttpResponse('Error in sending mails (probably wrong address?). Data not saved!')
|
||||||
|
|
||||||
|
def get_email_context(self, obj, data):
|
||||||
|
return {
|
||||||
|
'data': data,
|
||||||
|
'urls': self.get_urls(obj),
|
||||||
|
'form_data': self.get_form_data(obj, data),
|
||||||
|
'applicant_name': self.get_recipient_name(obj, data),
|
||||||
|
'type_label': self.sanitize_label(self.type_info.label),
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_urls(self, obj, **urls):
|
||||||
|
urls['admin'] = self.get_absolute_url(admin_url_name(obj, 'change'), obj.id)
|
||||||
|
|
||||||
|
if isinstance(obj, Project):
|
||||||
|
urls['authorize'] = urls['deny'] = None
|
||||||
|
else:
|
||||||
|
urls['authorize'] = self.get_absolute_url('authorize', self.type_info.code, obj.id)
|
||||||
|
urls['deny'] = self.get_absolute_url('deny', self.type_info.code, obj.id)
|
||||||
|
|
||||||
|
return urls
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_absolute_url(view, *args):
|
||||||
|
return urljoin(settings.EMAIL_URL_PREFIX, reverse(view, args=args))
|
||||||
|
|
||||||
|
def get_form_data(self, obj, data):
|
||||||
|
return {
|
||||||
|
self.sanitize_label(field.label): self.format_value(field.field, field.initial)
|
||||||
|
for field in self.type_info.form_class(initial=data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def sanitize_label(label: str):
|
||||||
|
label = strip_tags(label)
|
||||||
|
words = str.split(label)
|
||||||
|
|
||||||
|
return ' '.join(words)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def format_value(field: Field, value):
|
||||||
|
if isinstance(field, ChoiceField):
|
||||||
|
choices = flatten_choices(field.choices)
|
||||||
|
value = dict(choices).get(value, value)
|
||||||
|
elif isinstance(value, bool):
|
||||||
|
value = '✓' if value else '✗'
|
||||||
|
elif isinstance(value, datetime.date):
|
||||||
|
value = date_format(value)
|
||||||
|
elif value in field.empty_values:
|
||||||
|
value = '–'
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
def send_email(self, kind, template_name, subject, recipient, context, *, fail_silently=False):
|
def send_email(self, kind, template_name, subject, recipient, context, *, fail_silently=False):
|
||||||
email = build_email(template_name, context, subject, recipient)
|
email = build_email(template_name, context, subject, recipient)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue