def get(self): template_values = {'session':self.session} template_values['user'] = User.gql("WHERE name = :1", self.request.get('id')).fetch(1)[0] # shady, get the user w/ username template_values['unfulfilled'] = Wish.gql("WHERE user_key = :1 AND status != 'fulfilled'", self.request.get('id')) template_values['fulfilled'] = Wish.gql("WHERE user_key = :1 AND status = 'fulfilled'", self.request.get('id')) template_values['to_complete'] = Wish.gql("WHERE user_fulfiller_key = :1 AND status != 'fulfilled'", self.request.get('id')) template_values['completed'] = Wish.gql("WHERE user_fulfiller_key = :1 AND status = 'fulfilled'", self.request.get('id')) template_values['flash'] = self.request.get('flash') template = jinja_environment.get_template("views/user.html") self.response.out.write(template.render(template_values))
def get(self): template_values = {'session':self.session} template_values['users'] = User.gql("ORDER BY money_donated DESC") template = jinja_environment.get_template("views/users.html") self.response.out.write(template.render(template_values))