def password_reset_complete(request, *args, **kwargs):
    defaults = {
        'template_name': 'accounts/password_reset_complete.html',
    }
    for key, value in defaults.items():
        kwargs.setdefault(key, value)
    return auth.password_reset_complete(request, *args, **kwargs)
Example #2
0
def password_reset_complete(request, *args, **kwargs):
    """Wrapper for auth.password_reset_complete."""
    if 'extra_context' not in kwargs:
        kwargs['extra_context'] = {}
    kwargs['extra_context']['title'] = "Password reset"
    kwargs['extra_context']['message'] = "Your password has been changed. <a href=\"%s\">Now you can log in.</a>" % reverse('login')
    return auth_views.password_reset_complete(request, *args, **kwargs)
Example #3
0
def password_reset_confirm(request):
    if request.method == 'POST':
        response = auth_views.password_reset_complete(request)
        return response
    else:
        form = UserPasswordChangeForm()
        return render(request, 'accounts/password_reset_confirm.html', {'form': form})
Example #4
0
def cust_password_reset_complete(request):
    """This will show acknowledge message to user after successfully resetting his/her password for the system."""
    if not request.user.is_authenticated():
        return password_reset_complete(request,
        template_name='registration/password_reset_complete.html')
    else:
        return HttpResponseRedirect("/")
def password_reset_complete(request):
    # Presents a view which informs the user that the password has been successfully changed.
    return views.password_reset_complete(
        request,
        template_name='accounts/password_reset_complete.html'
        # current_app=None,
        # extra_context={}
    )
Example #6
0
def password_reset_complete2(request):
        """
        django.contrib.auth.views.password_reset_done - after password reset view
        """
        if not request.user.is_authenticated():
            return password_reset_complete(request, template_name='password_reset_complete.html')
        else:
            print "no entro a password_reset_complete2"
            return HttpResponseRedirect(reverse("personal_data"))
Example #7
0
 def password_reset_complete(self, request, extra_context=None):
   from django.contrib.auth.views import password_reset_complete
   extra = extra_context or {}
   extra ['login_url'] = reverse_lazy('site:index')
   defaults = {
     'extra_context': extra,
     'template_name': 'auth/password_reset_complete.html',
   }
   return password_reset_complete(request, **defaults)
Example #8
0
def password_reset_complete_view(request):
    extra_context = {
        'appearance_type': 'plain'
    }

    return password_reset_complete(
        request, extra_context=extra_context,
        template_name='authentication/password_reset_complete.html'
    )
Example #9
0
def reset_done_pass(request):

	'''
	This view display messages
	that successful reset pass
	'''
	return password_reset_complete(
		request,
		template_name='baseapp/password_reset_complete.html',
		current_app=None, extra_context=None
	)
Example #10
0
def reset_done_pass(request):
    """
    This view display messages
    that successful reset pass
    """
    if request.user.is_authenticated():
        return redirect("forums")

    return password_reset_complete(
        request, extra_context=None,
        template_name='musette/password_reset_complete.html',
    )
Example #11
0
def cust_password_reset_complete(request):
    """Use ``django.contrib.auth.views.password_reset_complete`` view method
    for forgotten password on theCustomer UI

    This shows an acknowledgement to the user after successfully resetting
    their password for the system.
    """
    if not request.user.is_authenticated():
        data = {'loginform': LoginForm()}
        return password_reset_complete(
            request, template_name='frontend/registration/password_reset_complete.html',
            extra_context=data)
    else:
        return HttpResponseRedirect("/")
Example #12
0
def password_reset_complete(request, *args, **kwargs):
    errorMessage, warningMessage, infoMessage = get_session_messages(request)
    template_response = auth_views.password_reset_complete(request, *args, **kwargs)
    if template_response.status_code == 302:
        # if we redirect, no need to change the response data
        return template_response
    template_response.context_data.update({
                                           'errorMessage':errorMessage,
                                            'warningMessage':warningMessage,
			                                'infoMessage':infoMessage,
						                    'adminName':adminName,
						                    'adminEmail':adminEmail,
						                    'siteVersion':siteVersion,
						                    'imsVersion':imsVersion,})
    return template_response
Example #13
0
    def test_titles(self):
        rf = RequestFactory()
        user = User.objects.create_user('jsmith', '*****@*****.**', 'pass')
        user = authenticate(username=user.username, password='******')
        request = rf.get('/somepath/')
        request.user = user

        response = password_reset(request, post_reset_redirect='dummy/')
        self.assertContains(response, '<title>Password reset</title>')
        self.assertContains(response, '<h1>Password reset</h1>')

        response = password_reset_done(request)
        self.assertContains(response,
                            '<title>Password reset successful</title>')
        self.assertContains(response, '<h1>Password reset successful</h1>')

        # password_reset_confirm invalid token
        response = password_reset_confirm(request,
                                          uidb64='Bad',
                                          token='Bad',
                                          post_reset_redirect='dummy/')
        self.assertContains(response,
                            '<title>Password reset unsuccessful</title>')
        self.assertContains(response, '<h1>Password reset unsuccessful</h1>')

        # password_reset_confirm valid token
        default_token_generator = PasswordResetTokenGenerator()
        token = default_token_generator.make_token(user)
        uidb64 = force_text(urlsafe_base64_encode(force_bytes(user.pk)))
        response = password_reset_confirm(request,
                                          uidb64,
                                          token,
                                          post_reset_redirect='dummy/')
        self.assertContains(response, '<title>Enter new password</title>')
        self.assertContains(response, '<h1>Enter new password</h1>')

        response = password_reset_complete(request)
        self.assertContains(response, '<title>Password reset complete</title>')
        self.assertContains(response, '<h1>Password reset complete</h1>')

        response = password_change(request, post_change_redirect='dummy/')
        self.assertContains(response, '<title>Password change</title>')
        self.assertContains(response, '<h1>Password change</h1>')

        response = password_change_done(request)
        self.assertContains(response,
                            '<title>Password change successful</title>')
        self.assertContains(response, '<h1>Password change successful</h1>')
Example #14
0
def password_reset_complete(request, *args, **kwargs):
    errorMessage, warningMessage, infoMessage = get_session_messages(request)
    template_response = auth_views.password_reset_complete(
        request, *args, **kwargs)
    if template_response.status_code == 302:
        # if we redirect, no need to change the response data
        return template_response
    template_response.context_data.update({
        'errorMessage': errorMessage,
        'warningMessage': warningMessage,
        'infoMessage': infoMessage,
        'adminName': adminName,
        'adminEmail': adminEmail,
        'siteVersion': siteVersion,
        'imsVersion': imsVersion,
    })
    return template_response
Example #15
0
    def test_titles(self):
        rf = RequestFactory()
        user = User.objects.create_user('jsmith', '*****@*****.**', 'pass')
        user = authenticate(username=user.username, password='******')
        request = rf.get('/somepath/')
        request.user = user

        response = password_reset(request, post_reset_redirect='dummy/')
        self.assertContains(response, '<title>Password reset</title>')
        self.assertContains(response, '<h1>Password reset</h1>')

        response = password_reset_done(request)
        self.assertContains(response, '<title>Password reset sent</title>')
        self.assertContains(response, '<h1>Password reset sent</h1>')

        # password_reset_confirm invalid token
        response = password_reset_confirm(request, uidb64='Bad', token='Bad', post_reset_redirect='dummy/')
        self.assertContains(response, '<title>Password reset unsuccessful</title>')
        self.assertContains(response, '<h1>Password reset unsuccessful</h1>')

        # password_reset_confirm valid token
        default_token_generator = PasswordResetTokenGenerator()
        token = default_token_generator.make_token(user)
        uidb64 = force_text(urlsafe_base64_encode(force_bytes(user.pk)))
        response = password_reset_confirm(request, uidb64, token, post_reset_redirect='dummy/')
        self.assertContains(response, '<title>Enter new password</title>')
        self.assertContains(response, '<h1>Enter new password</h1>')

        response = password_reset_complete(request)
        self.assertContains(response, '<title>Password reset complete</title>')
        self.assertContains(response, '<h1>Password reset complete</h1>')

        response = password_change(request, post_change_redirect='dummy/')
        self.assertContains(response, '<title>Password change</title>')
        self.assertContains(response, '<h1>Password change</h1>')

        response = password_change_done(request)
        self.assertContains(response, '<title>Password change successful</title>')
        self.assertContains(response, '<h1>Password change successful</h1>')
Example #16
0
def reset_complete(request):
	return authviews.password_reset_complete(request, template_name='account/password_reset_complete.html')
Example #17
0
def reset_password_complete(request):
    return password_reset_complete(request, template_name='powermonitorweb/reset_password_complete.html')
Example #18
0
def cust_password_reset_complete(request):
    if not request.user.is_authenticated():
        return password_reset_complete(
            request, template_name='registration/password_reset_complete.html')
    else:
        return HttpResponseRedirect("/")
Example #19
0
def password_reset_complete(request, **kwargs):
    # Hide message from undefined paths
    if not request.session.pop('used_change_form', False):
        return redirect('index')
    else:
        return auth_views.password_reset_complete(request, **kwargs)
Example #20
0
def reset_complete(request):
    return password_reset_complete(request, template_name='password_reset_complete.html')
Example #21
0
def cust_password_reset_complete(request): 
    if not request.user.is_authenticated():
        return password_reset_complete(request,
            template_name='registration/password_reset_complete.html')
    else:
        return HttpResponseRedirect("/")
Example #22
0
def password_reset_complete(request):
    return auth_views.password_reset_complete(
        request,
        template_name='accounts/password_reset_complete.html',
    )
Example #23
0
def reset_password_complete(request):
    template_response = password_reset_complete(
        request, template_name='registration/password_reset_complete.html')
    return template_response
Example #24
0
def reset_password_complete(request):
    template_response = password_reset_complete(
        request, template_name='auth/pwd_reset/password_reset_complete.html')
    return template_response
Example #25
0
 def get(self, request, *args, **kwargs):
     print("hello")
     return password_reset_complete(request,
                                    template_name=self.template_name,
                                    current_app=None,
                                    extra_context=None)
Example #26
0
def reset_password_done(request):
    return authViews.password_reset_complete(request,
                                             template_name="reset_password_done.html")
Example #27
0
def reset_complete(request):
	log.info("Password reset completed for user from {0}".format(get_client_ip(request)))
	return authviews.password_reset_complete(request, template_name='account/password_reset_complete.html')
Example #28
0
def password_reset_complete(request):
    return views.password_reset_complete(
        request,
        template_name='registration/password_reset_complete.html'
    )
Example #29
0
def password_reset_complete(request, extra_context={}, **kwargs):
    extra_context.update({'login_url': get_login_url()})
    return auth_views.password_reset_complete(
        request, extra_context=extra_context, **kwargs)
Example #30
0
 def render_to_response(self, context, **response_kwargs):
     context.update(self.settings)
     return password_reset_complete(request=self.request,
                                    template_name=self.get_template_names(),
                                    extra_context=context)
Example #31
0
def reset_complete(request, **kwargs):
    state = 'You have completed resetting your password.'
    return password_reset_complete(
        request,
        template_name="registration/password_reset_complete.html",
        extra_context={'state': state, })
Example #32
0
def reset_complete(request):
    return auth_views.password_reset_complete(
        request,
        template_name='accounts/password/reset/complete.html',
        extra_context=None)
Example #33
0
def reset_complete(request):
    return password_reset_complete(request, template_name="registration/reset_password_complete.html")
Example #34
0
def password_reset_complete(request, *args, **kwargs):
    kwargs.update({
        'template_name':
        'aldryn_accounts/reset/password_reset_complete.html',
    })
    return auth_views.password_reset_complete(request, *args, **kwargs)
Example #35
0
def password_reset_complete(request):
    return aviews.password_reset_complete(request,
        template_name='password_reset_complete.html',
        extra_context={})
Example #36
0
def reset_complete(request):
    """Displays a message confirming that the new password is set"""
    return password_reset_complete(
        request,
        template_name='accounts/registration/password_reset_complete.html')
Example #37
0
def custom_password_reset_complete(request, *args, **kwargs):
    response = password_reset_complete(request,
                                       template_name='password_reset_complete.html')
    return response
Example #38
0
def reset_password_complete(request):
    return password_reset_complete(
        request, template_name='powermonitorweb/reset_password_complete.html')
Example #39
0
            'form_title': 'Forgot Password',
            'form_submit': 'Retreive Password',
        }, **kwargs
        ), name='password_reset'),
      url(r'^reset/retreive/$', lambda req, **kwargs: auth_views.password_reset_done(
        req, template_name='message.html',
        # post_reset_redirect='auth.password_reset_done',
        extra_context={
            'message_title': 'Forgot Password',
            'message_content': views.PASSWORD_RESET_DONE_MSG,
        }, **kwargs
        ), name='password_reset_done'),
      url(views.PASSWORD_RESET_TOKEN_REGEX, lambda req, **kwargs: auth_views.password_reset_confirm(
              req, template_name='form.html',
              post_reset_redirect=reverse_lazy('auth:password_reset_complete'),
              extra_context={
                  'form_title': 'Reset Password',
                  'form_submit': 'Reset',
                  'exception_msg': views.PASSWORD_RESET_EX_MSG,
              }, **kwargs
          ), name='password_reset_confirm'),
      url(r'^reset/done/$', lambda req, **kwargs: auth_views.password_reset_complete(  # Ignore PycodestyleBear (E501)
          req, template_name='message.html',
          extra_context={
              'message_title': 'Reset Password',
              'message_content': views.PASSWORD_RESET_COMPLETE,
          }, **kwargs
      ), name='password_reset_complete'),

]
Example #40
0
def custom_password_reset_complete(request, *args, **kwargs):
    response = password_reset_complete(
        request, template_name='password_reset_complete.html')
    return response
Example #41
0
        ), name='password_reset'),


    url(r'^password-reset-done/$', lambda request, **kwargs: password_reset_done(
        request,
        template_name='registration/password_reset_done.html',

        ), name='password_reset_done'),

    url(r'^password-reset/confirm/(?P<uidb64>[-\w]+)/(?P<token>[-\w]+)/$',
            lambda request, **kwargs: password_reset_confirm(

              request, template_name='registration/password_reset_confirm.html',
              post_reset_redirect=reverse_lazy('account:password_reset_complete'),
              extra_context={
                    'form_title': 'Reset Password',
                    'form_submit': 'Reset',
                    'exception_msg': views.PASSWORD_RESET_EX_MSG,
                }, **kwargs

            ), name='password_reset_confirm'),

    url(r'^password-reset-complete/$', lambda request, **kwargs: password_reset_complete(

          request, template_name='registration/password_reset_complete.html',
      ), name='password_reset_complete'),

]


Example #42
0
def password_reset_complete(request, *args, **kwargs):
    return django_auth_views.password_reset_complete(request, *args, **kwargs)
Example #43
0
def my_password_reset_complete(request,
                               template='account/password_reset_complete.html'
                               ):
    return auth_views.password_reset_complete(request, template_name=template)
Example #44
0
def password_reset_complete(request):
    return auth_views.password_reset_complete(
        request, template_name="base/auth/forgot_password_complete.html")
Example #45
0
def password_reset_complete(request):
    return auth_views.password_reset_complete(
        request=request,
        template_name="auth/password_reset_complete.html"
    )
Example #46
0
def reset_password_complete(request):
    template = 'registration/reset_my_password_complete.html'
    return password_reset_complete(request, template_name=template)
Example #47
0
def password_reset_complete(request):
    context = {
        'template_name': 'main_app/password_reset_complete.html',
    }
    return authv.password_reset_complete(request, **context)
Example #48
0
def reset_complete(request):
    return password_reset_complete(
        request, template_name='password_reset_complete.html')
Example #49
0
def  password_reset_complete(request):
    template_response=views.password_reset_complete(request)
    # Do something with the template response
    return  template_response
Example #50
0
def password_reset_complete(request):
    return auth_views.password_reset_complete(request, template_name="base/auth/forgot_password_complete.html")
Example #51
0
def password_reset_confirm_done(request):
    return aviews.password_reset_complete(
        request, template_name='password_reset_confirm_done.html')
Example #52
0
def password_reset_complete(request):
    response = auth_views.password_reset_complete(request)

    return response
Example #53
0
def reset_complete(request):
	log.info("Password reset completed for user from {0}".format(get_client_ip(request)))
	return authviews.password_reset_complete(request, template_name='account/password_reset_complete.html')
Example #54
0
def password_reset_complete(request, *args, **kwargs):
    return django_auth_views.password_reset_complete(request, *args, **kwargs)
Example #55
0
def password_reset_complete(request):
    """ view that handles the recover password process """

    template_name = "accounts/password_reset_complete.html"
    return auth_views.password_reset_complete(request,
                                              template_name=template_name)
Example #56
0
def password_reset_complete(request):
    """ view that handles the recover password process """

    template_name = "registration/password_reset_complete.jade"
    return auth_views.password_reset_complete(request,
                                              template_name=template_name)
Example #57
0
def user_password_reset_complete(request):
    return password_reset_complete(
        request,
        template_name='registration/user_password_reset_complete.html')