mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-18 20:21:11 +00:00
Use BASE_URL in password reset email if available - fixes #841
This commit is contained in:
parent
77340cfe95
commit
82cca64b2a
2 changed files with 7 additions and 2 deletions
|
|
@ -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 %}
|
||||
|
|
@ -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>')
|
||||
|
|
|
|||
Loading…
Reference in a new issue