Skip to content

Commit

Permalink
fix settings tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Jan 8, 2021
1 parent 408c251 commit 01e5799
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spirit/core/tags/settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-

from ..conf import settings as st_settings
from spirit.core.conf import settings as st_settings

from .registry import register


@register.simple_tag(takes_context=True)
def load_settings(context, *settings):
context['st_settings'] = {
context.setdefault('st_settings', {}).update({
setting: getattr(st_settings, setting)
for setting in settings}
for setting in settings})
return ''
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

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

{% load i18n %}
{% load spirit_tags i18n %}
{% load_settings 'LOGIN_URL' %}

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

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

<p><a href="{% url LOGIN_URL %}"
<p><a href="{% url st_settings.LOGIN_URL %}"
>{% trans 'Continue to login' %}</a></p>
</div>
{% endblock %}
1 change: 0 additions & 1 deletion spirit/user/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class _CustomPasswordResetConfirmView(django_views.PasswordResetConfirmView):

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


class _CustomPasswordResetDoneView(django_views.PasswordResetDoneView):
Expand Down

0 comments on commit 01e5799

Please sign in to comment.