def get(self): userKey=self.request.path[6:] #Chops off the end of the request path to get the user key user=AppUser.get_by_key_name(userKey) if not user: self.redirect('/?' + urllib.urlencode({'message':'Error: No such user found.'})) currentUser = AppUser.getUser() if users.get_current_user(): url = users.create_logout_url(self.request.uri) url_linktext = 'Logout' else: url = users.create_login_url(self.request.uri) url_linktext = 'Login' template_values = { 'url': url, 'url_linktext': url_linktext, 'user': user, 'events': [], 'currentUser':currentUser } #Displays: #Username (nickname) #Good/bad event counts #Verified status #Events (later) path = os.path.join(os.path.dirname(__file__), './templates/viewUser.html') self.response.out.write(template.render(path, template_values))
def get(self): userKey=self.request.path[6:] #Chops off the end of the request path to get the user key user=AppUser.get_by_key_name(userKey) nickname=user.id.nickname() currentUser = AppUser.getUser() template_values = { 'nickname':nickname, 'user':user, 'events':[] } #Displays: #Username (nickname) #Good/bad event counts #Verified status #Events (later) path = os.path.join(os.path.dirname(__file__), './templates/viewUser.html') self.response.out.write(template.render(path, template_values))