def process_change_contact_info(request,user): data = args_utils.concatenate_dicts(user.get_profile().address.__dict__,user.get_profile().__dict__) data['address_type'] = data.get('address_type_id') data['country'] = data.get('country_id') data['province'] = data.get('province_id') data['supplier_type'] = data.get('supplier_type_id') data['buyer_type'] = data.get('client_type_id') form = common_forms.ContactInfoForm(data=data) t = template.loader.get_template('accounts/change_contact.html') c = template.Context({'form': form, 'request' : request}) html = t.render(c) tab_title = 'Change Contact Info' action = common_tags.codify(tab_title) return html,tab_title,action
def manage_account(request): user = request.user data = args_utils.concatenate_dicts(user.get_profile().__dict__,user.get_profile().address.__dict__) data['address_type'] = data.get('address_type_id') data['country'] = data.get('country_id') data['province'] = data.get('province_id') data['supplier_type'] = data.get('supplier_type_id',None) data['buyer_type'] = data.get('client_type_id',None) form = common_forms.ContactInfoForm(data=data) tab_title = 'Change Contact Info' action = 'change_contact' d = dict( form = form, tab_title = tab_title, ) return shortcuts.render_to_response('accounts/manage_account.html',d,context_instance=RequestContext(request))