def password_change(self, request): """ Handles the "change password" task -- both form display and validation. """ from UserManagement.views import password_change user = get_user(request) country = get_country_from_url(request.get_full_path()) url = '/%s/' % (country) extra_context = { 'country' : '%s' % (country), 'home_url' : url } extra_context['profile'] = user.get_profile(); extra_context['modules'] = get_accessble_modules(request,sel_mod='Users',sel_action='') defaults = { 'current_app': self.name, 'extra_context' : extra_context, 'post_change_redirect': url + 'password_change/done/' } #import pdb #pdb.set_trace() if self.password_change_template is not None: defaults['template_name'] = self.password_change_template return password_change(request, **defaults)
def password_change(self, request): """ Handles the "change password" task -- both form display and validation. """ from UserManagement.views import password_change url = reverse('customer_admin:password_change_done', current_app=self.name) defaults = { 'current_app': self.name, 'post_change_redirect': url } #import pdb #pdb.set_trace() if self.password_change_template is not None: defaults['template_name'] = self.password_change_template return password_change(request, **defaults)