Revision 8fb8d0cf snf-astakos-app/astakos/im/views/target/local.py
b/snf-astakos-app/astakos/im/views/target/local.py | ||
---|---|---|
45 | 45 |
from astakos.im.util import prepare_response, get_query |
46 | 46 |
from astakos.im.models import PendingThirdPartyUser |
47 | 47 |
from astakos.im.forms import LoginForm, ExtendedPasswordChangeForm, \ |
48 |
ExtendedSetPasswordForm
|
|
48 |
ExtendedSetPasswordForm |
|
49 | 49 |
from astakos.im import settings |
50 | 50 |
import astakos.im.messages as astakos_messages |
51 | 51 |
from astakos.im import auth_providers as auth |
... | ... | |
85 | 85 |
|
86 | 86 |
return render_to_response( |
87 | 87 |
on_failure, |
88 |
{'login_form':form, |
|
89 |
'next':next, |
|
88 |
{'login_form': form,
|
|
89 |
'next': next,
|
|
90 | 90 |
'key': third_party_token}, |
91 | 91 |
context_instance=RequestContext(request)) |
92 | 92 |
|
... | ... | |
152 | 152 |
@cookie_fix |
153 | 153 |
def password_reset(request, *args, **kwargs): |
154 | 154 |
kwargs['post_reset_redirect'] = reverse( |
155 |
'astakos.im.views.target.local.password_reset_done')
|
|
155 |
'astakos.im.views.target.local.password_reset_done') |
|
156 | 156 |
return django_auth_views.password_reset(request, *args, **kwargs) |
157 | 157 |
|
158 | 158 |
|
159 | 159 |
@cookie_fix |
160 | 160 |
def password_reset_confirm(request, *args, **kwargs): |
161 | 161 |
kwargs['post_reset_redirect'] = reverse( |
162 |
'astakos.im.views.target.local.password_reset_complete')
|
|
162 |
'astakos.im.views.target.local.password_reset_complete') |
|
163 | 163 |
return django_auth_views.password_reset_confirm(request, *args, **kwargs) |
164 | 164 |
|
165 | 165 |
|
... | ... | |
173 | 173 |
@login_required |
174 | 174 |
@cookie_fix |
175 | 175 |
@requires_auth_provider('local', login=True) |
176 |
def password_change(request, template_name='registration/password_change_form.html', |
|
177 |
post_change_redirect=None, password_change_form=ExtendedPasswordChangeForm): |
|
176 |
def password_change(request, |
|
177 |
template_name='registration/password_change_form.html', |
|
178 |
post_change_redirect=None, |
|
179 |
password_change_form=ExtendedPasswordChangeForm): |
|
178 | 180 |
|
179 | 181 |
create_password = False |
180 | 182 |
|
... | ... | |
216 | 218 |
'form': form, |
217 | 219 |
}, context_instance=RequestContext(request, {'create_password': |
218 | 220 |
create_password})) |
219 |
|
Also available in: Unified diff