Commit 8ca369ae2cfeaa4e2c77b96688e5649f84dc5a53

Authored by ifac0
1 parent afd96ba8

atualização de urls para remember password #58

core/templates/registration/passwor_reset_email.html
@@ -2,7 +2,7 @@ To initiate the password reset process for your {{ user.get_username }} TestSite @@ -2,7 +2,7 @@ To initiate the password reset process for your {{ user.get_username }} TestSite
2 click the link below: 2 click the link below:
3 3
4 {% block reset_link %} 4 {% block reset_link %}
5 -{{ protocol }}://{{ domain }}{% url 'core:passwor_reset_confirm' uidb36=uid token=token %} 5 +{{ protocol }}://{{ domain }}{% url 'core:password_reset_confirm' uidb64=uid token=token %}
6 6
7 {% endblock %} 7 {% endblock %}
8 8
core/templates/registration/password_reset_subject.txt 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +{% load i18n %}{% autoescape off %}
  2 +{% blocktrans %}Password reset on {{ site_name }}{% endblocktrans %}
  3 +{% endautoescape %}
@@ -11,13 +11,17 @@ urlpatterns = [ @@ -11,13 +11,17 @@ urlpatterns = [
11 url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'), 11 url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'),
12 url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'), 12 url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'),
13 url(r'^getNotifications/$', views.getNotifications, name='getNotifications'), 13 url(r'^getNotifications/$', views.getNotifications, name='getNotifications'),
14 -]  
15 14
16 #Reset Password 15 #Reset Password
17 -urlpatterns += [  
18 - url(r'^password/reset/$', password_reset, {'post_reset_redirect' : 'password/reset/done/','template_name': 'registration/passwor_reset_form.html'}, name="password_reset"),  
19 - url(r'^password/reset/done/$', password_reset_done, {'template_name': 'registration/passwor_reset_done.html'}),  
20 - url(r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', password_reset_confirm, {'post_reset_redirect' : 'password/done/', 'template_name': 'registration/password_reset_confirm.html'}),  
21 - url(r'^password/done/$', password_reset_complete,{'template_name': 'registration/passwor_reset_complete.html'}),  
22 16
  17 + url(r'^reset/$', password_reset, {'template_name':'registration/passwor_reset_form.html',
  18 + 'email_template_name':'registration/passwor_reset_email.html',
  19 + 'subject_template_name' :'registration/password_reset_subject.txt',
  20 + 'post_reset_redirect':'done/'}, name="password_reset"),
  21 + url(r'^reset/done/$', password_reset_done, {'template_name':'registration/passwor_reset_done.html'}),
  22 + url(r'^reset/(?P<uidb64>[0-9A-Za-z]+)/(?P<token>.+)/$', password_reset_confirm,
  23 + {'template_name':'registration/passwor_reset_confirm.html',
  24 + 'post_reset_redirect' : 'done/'},
  25 + name='password_reset_confirm'),
  26 + url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}),
23 ] 27 ]