Revision af15e964

b/snf-astakos-app/astakos/im/messages.py
40 40
INACTIVE_ACCOUNT_CHANGE_EMAIL           =   ''.join([ACCOUNT_RESEND_ACTIVATION, ' or <a href="%(signup_url)s">Provide new email?</a>'])
41 41

  
42 42
ACCOUNT_PENDING_ACTIVATION_HELP         =   'If you haven\'t received activation email, be sure to check your spam folder.'
43
PASSWORD_RESET_DONE                     =   'A mail with details on how to change your password was sent.'
44
PASSWORD_RESET_CONFIRM_DONE             =   'Password changed. You can now login using your new password.'
43 45

  
44 46
ACCOUNT_RESEND_ACTIVATION_PROMPT        =   'Resend activation mail'
45 47
ACCOUNT_USER_ACTIVATION_PENDING         =   'You have not followed the activation link'
......
58 60
MEMBER_REMOVED                          =   '%(realname)s has been successfully removed from the group.'
59 61
BILLING_ERROR                           =   'Service response status: %(status)d'
60 62
LOGOUT_SUCCESS                          =   'You have successfully logged out.'
63
LOGIN_SUCCESS                           =   'You have successfully logged in.'
61 64

  
62 65
GENERIC_ERROR                           =   'Something wrong has happened. \
63 66
                                               Please contact the administrators for more details.'
b/snf-astakos-app/astakos/im/target/local.py
80 80
            {'login_form':form,
81 81
             'next':next,
82 82
             'key': third_party_token},
83
            context_instance=RequestContext(request)
84
        )
83
            context_instance=RequestContext(request))
84

  
85 85
    # get the user from the cache
86 86
    user = form.user_cache
87 87

  
......
115 115
        except PendingThirdPartyUser.DoesNotExist:
116 116
            messages.error(request, _(astakos_messages.AUTH_PROVIDER_ADD_FAILED))
117 117

  
118
    messages.success(request, _(astakos_messages.LOGIN_SUCCESS))
118 119
    return response
119 120

  
121

  
122
@require_http_methods(["GET"])
123
def password_reset_done(request, *args, **kwargs):
124
    messages.success(request, _(astakos_messages.PASSWORD_RESET_DONE))
125
    return HttpResponseRedirect(reverse('index'))
126

  
127

  
128
@require_http_methods(["GET"])
129
def password_reset_confirm_done(request, *args, **kwargs):
130
    messages.success(request, _(astakos_messages.PASSWORD_RESET_CONFIRM_DONE))
131
    return HttpResponseRedirect(reverse('index'))
132

  
133

  
120 134
@require_http_methods(["GET", "POST"])
121 135
@signed_terms_required
122 136
@login_required
b/snf-astakos-app/astakos/im/urls.py
87 87
            'post_change_redirect':'profile',
88 88
            'password_change_form':ExtendedPasswordChangeForm
89 89
            },
90
            name='password_change')
90
            name='password_change'),
91
        url(r'^local/password_reset/done$', 'local.password_reset_done'),
92
        url(r'^local/reset/confirm/done$',
93
            'local.password_reset_confirm_done')
91 94
    )
92 95
    urlpatterns += patterns('django.contrib.auth.views',
93
        url(r'^local/password_reset/?$', 'password_reset',
94
         {'email_template_name':'registration/password_email.txt',
95
          'password_reset_form':ExtendedPasswordResetForm}),
96
        url(r'^local/password_reset/?$', 'password_reset', {
97
            'email_template_name':'registration/password_email.txt',
98
            'password_reset_form':ExtendedPasswordResetForm,
99
            'post_reset_redirect':'password_reset/done'
100
         }),
96 101
        url(r'^local/password_reset_done/?$', 'password_reset_done'),
97 102
        url(r'^local/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/?$',
98
         'password_reset_confirm', {'set_password_form':ExtendedSetPasswordForm}),
103
         'password_reset_confirm', {
104
             'set_password_form':ExtendedSetPasswordForm,
105
             'post_reset_redirect': 'done'
106
         }),
99 107
        url(r'^local/password/reset/complete/?$', 'password_reset_complete')
100 108
    )
101 109

  

Also available in: Unified diff