def rpc_get_user_info(self, username): profile_db = zoodb.profile_setup() p = profile_db.query(zoodb.Profile).get(username) if not p: return None return { 'username': p.username, 'profile': p.profile, 'zoobars': bank.balance(username), }
def rpc_get_user_info(self, username): person_db = zoodb.person_setup() p = person_db.query(zoodb.Person).get(username) if not p: return None return { 'username': p.username, 'profile': p.profile, 'zoobars': bank.balance(username), }
def users(): args = {} args['req_user'] = Markup(request.args.get('user', '')) if 'user' in request.values: _, user = auth.getPerson(request.values['user']) if user: p = user.profile p_markup = Markup("<b>%s</b>" % p) args['profile'] = p_markup args['user'] = user args['user_zoobars'] = bank.balance(user.username) args['transfers'] = bank.get_log(user.username) else: args['warning'] = "Cannot find that user." return render_template('users.html', **args)
def users(): args = {} args['req_user'] = Markup(request.args.get('user', '')) if 'user' in request.values: persondb = person_setup() user = persondb.query(Person).get(request.values['user']) if user: p = user.profile if p.startswith("#!python"): p = run_profile(user) p_markup = Markup("<b>%s</b>" % p) args['profile'] = p_markup args['user'] = user args['user_zoobars'] = bank.balance(user.username) args['transfers'] = bank.get_log(user.username) else: args['warning'] = "Cannot find that user." return render_template('users.html', **args)
def users(): args = {} args['req_user'] = Markup(request.args.get('user', '')) if 'user' in request.values: persondb = person_setup() user = persondb.query(Person).get(request.values['user']) if user: transferdb = transfer_setup() p = user.profile if p.startswith("#!python"): p = run_profile(user) p_markup = Markup("<b>%s</b>" % p) args['profile'] = p_markup args['user'] = user args['user_zoobars'] = bank.balance(user.username) args['transfers'] = bank.get_log(user.username) else: args['warning'] = "Cannot find that user." return render_template('users.html', **args)
def setPerson(self, username, token): persondb = person_setup() self.person = persondb.query(Person).get(username) self.token = token self.zoobars = bank.balance(username)
def rpc_balance(self, username): return bank.balance(username)
def rpc_balance(self, uname): return bank.balance(uname)
def rpc_balance(self,user_name): token = bank.balance(user_name) return token
def setPerson(self, username, token): db, person = auth.getPerson(username) self.person = person self.token = token self.zoobars = bank.balance(username)