Merged in hotfix/html-email (pull request #47)
Add html links to emails Approved-by: Ramon Wenger <ramon.wenger@iterativ.ch>
This commit is contained in:
commit
950faf1c9c
|
|
@ -1,9 +1,12 @@
|
|||
{% load i18n %}{% autoescape off %}
|
||||
{% load i18n %}
|
||||
{% load core_tags %}
|
||||
{% autoescape off %}
|
||||
|
||||
{% blocktrans %}Du erhältst dieses E-Mail, weil dein Passwort auf {{ site_name }} zurückgesetzt wurde.{% endblocktrans %}
|
||||
|
||||
{% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
|
||||
<a href="{% reset_link 'password_reset_confirm' protocol domain token uid %}">{% reset_link 'password_reset_confirm' protocol domain token uid %}</a>
|
||||
{% endblock %}
|
||||
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{% load i18n %}{% autoescape off %}
|
||||
{% load i18n %}
|
||||
{% load core_tags %}
|
||||
{% autoescape off %}
|
||||
|
||||
{% blocktrans %}Sie erhalten diese E-Mail, um Ihr Passwort auf mySkillbox initial zu setzen.{% endblocktrans %}
|
||||
|
||||
{% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'set_password_confirm' uidb64=uid token=token %}
|
||||
<a href="{% reset_link 'set_password_confirm' protocol domain token uid %}">{% reset_link 'set_password_confirm' protocol domain token uid %}</a>
|
||||
{% endblock %}
|
||||
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{% load i18n %}{% autoescape off %}
|
||||
{% load i18n %}
|
||||
{% load core_tags %}
|
||||
{% autoescape off %}
|
||||
|
||||
{% blocktrans %}Sie erhalten diese E-Mail, um Ihr Passwort auf mySkillbox initial zu setzen.{% endblocktrans %}
|
||||
|
||||
{% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'set_password_confirm' uidb64=uid token=token %}
|
||||
<a href="{% reset_link 'set_password_confirm' protocol domain token uid %}">{% reset_link 'set_password_confirm' protocol domain token uid %}</a>
|
||||
{% endblock %}
|
||||
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
|
||||
from django import template
|
||||
from django.urls import reverse
|
||||
from rest_framework import serializers
|
||||
|
||||
register = template.Library()
|
||||
|
|
@ -18,4 +19,9 @@ def json_dumps(obj):
|
|||
|
||||
@register.filter(name='class_name')
|
||||
def class_name(obj):
|
||||
return str(obj.__class__.__name__)
|
||||
return str(obj.__class__.__name__)
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def reset_link(name, protocol, domain, token, uid):
|
||||
return '{}://{}{}'.format(protocol, domain, reverse(name, kwargs={'uidb64': uid, 'token': token}))
|
||||
|
|
|
|||
Loading…
Reference in New Issue