Skip to content

Commit

Permalink
Update issue with password reset email
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoseba committed Mar 21, 2024
1 parent 4498b0e commit 60ccd42
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
4 changes: 2 additions & 2 deletions authentication/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.urls import path
from django.urls import path, reverse_lazy

from authentication import views
from django.contrib.auth import views as auth_views
Expand All @@ -10,7 +10,7 @@

path('login/', auth_views.LoginView.as_view(), {'redirect_authenticated_user': True}, name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('account/password_reset/', auth_views.PasswordResetView.as_view(), name='password_reset'),
path('account/password_reset/', auth_views.PasswordResetView.as_view(success_url=reverse_lazy('auth:password_reset_done')), name='password_reset'),
path('account/password_reset/done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
path('account/reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
path('account/reset/done/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
Expand Down
2 changes: 1 addition & 1 deletion templates/member/card_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div class="mesm_footer">
{% if current_market and current_market.banner_image %}
<img src="{{current_market.banner_image.url}}" alt="Logo MESM">
<img src="{{current_market.banner_image.url}}" alt="Logo {{current_market.name}}">
{% else %}
<img src="{% static '/imgs/brand.png' %}" alt="Logo MESM">
{% endif %}
Expand Down
29 changes: 29 additions & 0 deletions templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends 'common/email/base.html' %}
{% load settings_value %}
{% load i18n %}

{% block title %}Recuperar contraseña{% endblock %}

{% block maintitle %}Recuperar contraseña{% endblock %}

{% block content %}

{% autoescape off %}
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}

{% translate "Please go to the following page and choose a new password:" %}

{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}

{% translate "Thanks for using our site!" %}
{% endautoescape %}

{% endblock%}

{% block call_button %}

{% url 'auth:password_reset_confirm' uidb64=uid token=token as link %}
{% translate "Restaurar contraseña" as link_text %}
{% include 'common/email/button.html' with link_text=link_text link_href=link %}

{% endblock call_button %}

0 comments on commit 60ccd42

Please sign in to comment.