Skip to content

Commit 01e5799

Browse files
committed
fix settings tag
1 parent 408c251 commit 01e5799

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

spirit/core/tags/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# -*- coding: utf-8 -*-
22

3-
from ..conf import settings as st_settings
3+
from spirit.core.conf import settings as st_settings
44

55
from .registry import register
66

77

88
@register.simple_tag(takes_context=True)
99
def load_settings(context, *settings):
10-
context['st_settings'] = {
10+
context.setdefault('st_settings', {}).update({
1111
setting: getattr(st_settings, setting)
12-
for setting in settings}
12+
for setting in settings})
1313
return ''

spirit/user/auth/templates/spirit/user/auth/password_reset_complete.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
{% extends "spirit/_base.html" %}
44

5-
{% load i18n %}
5+
{% load spirit_tags i18n %}
6+
{% load_settings 'LOGIN_URL' %}
67

78
{% block title %}{% trans 'Password change successful' %}{% endblock %}
89

910
{% block content %}
1011
<div class="layout__article">
1112
<h1 class="headline">{% trans 'Password change successful' %}</h1>
1213

13-
<p><a href="{% url LOGIN_URL %}"
14+
<p><a href="{% url st_settings.LOGIN_URL %}"
1415
>{% trans 'Continue to login' %}</a></p>
1516
</div>
1617
{% endblock %}

spirit/user/auth/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class _CustomPasswordResetConfirmView(django_views.PasswordResetConfirmView):
3838

3939
class _CustomPasswordResetCompleteView(django_views.PasswordResetCompleteView):
4040
template_name = 'spirit/user/auth/password_reset_complete.html'
41-
extra_context = {'LOGIN_URL': settings.LOGIN_URL}
4241

4342

4443
class _CustomPasswordResetDoneView(django_views.PasswordResetDoneView):

0 commit comments

Comments
 (0)