def balances_self(request): c = {} c['action'] = 'get_balances_self' resp = helix_cli.request(BalanceForm.get_balances_self_req(request)) c.update(process_helix_response(resp, 'balances', 'balances_error')) balances = resp.get('balances', []) return render_to_response('balance/balances_self.html', c, context_instance=RequestContext(request))
def user_balances(request, user_id): c = {} c['action'] = 'get_balances' c['user_id'] = user_id resp = helix_cli.request(BalanceForm.get_user_balances_req(request, user_id)) c.update(process_helix_response(resp, 'balances', 'balances_error')) balances = resp.get('balances', []) return render_to_response('user/balances.html', c, context_instance=RequestContext(request))