def get(self, request): # gets user's value from current Session user = session.get(request, 'user') # through template engine hold user's value exchange to page and return return simple_template('index.html', user=user, message='Hi, World!')
def get(self, request): # from GET request gets state parameter, if not exist then return default value 1 state = request.args.get('state', '1') # through template return login page, when state isn't 1, page information return username error or not exist return simple_template('layout.html', title='login', message='input username' if state == '1' else 'username error or not exist, re-enter')
def get(self): user = session.get(self.request, 'user') return simple_template('index.html', message='current user', user=user)
def get(self): if 'user' in self.session_map: return redirect('/') return simple_template('login/login.html')
def get(self): return simple_template('user/list.html', value=self.wechat.message_map.get( 'auto_replay', ''))
def get(self, request): # when get GET request through template return a register page return simple_template('layout.html', title='register', message='input register name')