Пример #1
0
	def get(self):
		user = users.get_current_user()
		if user is None: 
			self.redirect('/welcome')
			
		else:
			logout_url = users.create_logout_url('/')
			user_ent_key = ndb.Key(Account, user.user_id())
			# All the data rendering is now done by AjaxHomeHandler
			self.render('home.html',
						 user_name = utils.shorten_name(user.nickname()), 
						 logout_url = logout_url
						 )
Пример #2
0
	def get(self):
		user = users.get_current_user()
		if user is None: 
			self.redirect('/welcome')
			
		else:
			logout_url = users.create_logout_url('/')
			user_ent_key = ndb.Key(Account, user.user_id())
			# All the data rendering is now done by AjaxHomeHandler
			self.render('home.html',
						 user_name = utils.shorten_name(user.nickname()), 
						 logout_url = logout_url
						 )
Пример #3
0
	def get(self):
		user = users.get_current_user()
		if user is None: 
			self.redirect(users.create_login_url('/login'))
		
		else:
			user_id = user.user_id()
			nickname = utils.shorten_name(user.nickname())
			email = user.email()
			status = Account.my_get_or_insert(user_id, 
											  nickname = nickname, 
											  email = email)
			self.redirect('/?fresh_user=' + str(status))			
Пример #4
0
	def get(self):
		user = users.get_current_user()
		if user is None: 
			self.redirect(users.create_login_url('/login'))
		
		else:
			user_id = user.user_id()
			nickname = utils.shorten_name(user.nickname())
			email = user.email()
			status = Account.my_get_or_insert(user_id, 
											  nickname = nickname, 
											  email = email)
			self.redirect('/?fresh_user=' + str(status))