[extensions-web] auth: fixed password reset



commit 709ec36f83873d782346095df378fdf6865450ab
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sat Nov 26 23:56:06 2016 +0300

    auth: fixed password reset

 .../registration/password_reset_email.html         |    2 +-
 sweettooth/auth/urls.py                            |   12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/auth/templates/registration/password_reset_email.html 
b/sweettooth/auth/templates/registration/password_reset_email.html
index f306249..7654ad5 100644
--- a/sweettooth/auth/templates/registration/password_reset_email.html
+++ b/sweettooth/auth/templates/registration/password_reset_email.html
@@ -1,7 +1,7 @@
 You have requested a password reset on {{ site_name }}. Please follow the link
 to reset your password.
 
-  https://extensions.gnome.org/{% url 'auth_password_reset_confirm' uidb36=uid token=token %}
+  https://extensions.gnome.org/{% url 'auth_password_reset_confirm' uidb64=uid token=token %}
 
 Thanks!
   the GNOME Shell Extensions team
diff --git a/sweettooth/auth/urls.py b/sweettooth/auth/urls.py
index d2eb6b3..77b2799 100644
--- a/sweettooth/auth/urls.py
+++ b/sweettooth/auth/urls.py
@@ -1,18 +1,18 @@
 
 from django.views.generic.base import TemplateView
 from django.conf.urls import patterns, url, include
-from django.contrib.auth.views import login, logout
+from django.contrib.auth import views as auth_views
 from sweettooth.auth import views, forms
 from registration.backends.default.views import RegistrationView
 
 urlpatterns = patterns('',
-    url(r'^login/', login,
+    url(r'^login/', auth_views.login,
         dict(template_name='registration/login.html',
              authentication_form=forms.AuthenticationForm), name='auth-login'),
 
     url(r'^change_display_name/(?P<pk>\d+)', views.ajax_change_display_name),
 
-    url(r'^logout/', logout,
+    url(r'^logout/', auth_views.logout,
         dict(next_page='/'), name='auth-logout'),
 
     url(r'^register/$', RegistrationView.as_view(form_class=forms.AutoFocusRegistrationForm),
@@ -21,7 +21,13 @@ urlpatterns = patterns('',
     url(r'settings/(?P<user>.+)', TemplateView.as_view(template_name='registration/settings.html'),
         name='auth-settings'),
 
+    url(r'^password/reset/$', auth_views.password_reset,
+        {'post_reset_redirect': 'auth_password_reset_done',
+        'email_template_name': 'registration/password_reset_email.html'},
+        name='auth_password_reset'),
+
     url(r'', include('registration.backends.default.urls')),
     url(r'^profile/(?P<user>.+)', views.profile, name='auth-profile'),
     url(r'^profile/', views.profile_redirect, name='auth-profile'),
+
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]