Use BASE_URL in password reset email if available - fixes #841

pull/997/head
Matt Westcott 2015-02-16 18:31:17 +00:00
rodzic 77340cfe95
commit 82cca64b2a
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -1,3 +1,3 @@
{% load i18n %}
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}
{% trans "Please follow the link below to reset your password" %}
{{ protocol }}://{{ domain }}{% url 'wagtailadmin_password_reset_confirm' uidb64=uid token=token %}
{% if base_url %}{{ base_url }}{% else %}{{ protocol }}://{{ domain }}{% endif %}{% url 'wagtailadmin_password_reset_confirm' uidb64=uid token=token %}

Wyświetl plik

@ -134,6 +134,11 @@ def usage_count_enabled():
return getattr(settings, 'WAGTAIL_USAGE_COUNT_ENABLED', False)
@register.assignment_tag
def base_url_setting():
return getattr(settings, 'BASE_URL', None)
class EscapeScriptNode(template.Node):
TAG_NAME = 'escapescript'
SCRIPT_RE = re.compile(r'<(-*)/script>')