kopia lustrzana https://github.com/wagtail/wagtail
Use BASE_URL in password reset email if available - fixes #841
rodzic
77340cfe95
commit
82cca64b2a
|
@ -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>')
|
||||
|
|
Ładowanie…
Reference in New Issue