Пример #1
0
	def save_user_page_data( self ):
		data = dict( self.request.params )
		route =  self.request.path
		entity = EnkiModelUserPageData.get_by_user_id_route( user_id = self.user_id, route = route )
		if entity:
			entity.data = data
		else:
			entity = EnkiModelUserPageData( user_id = self.user_id, route = route, data = data )
		entity.put()
Пример #2
0
 def save_user_page_data(self):
     data = dict(self.request.params)
     route = self.request.path
     entity = EnkiModelUserPageData.get_by_user_id_route(
         user_id=self.user_id, route=route)
     if entity:
         entity.data = data
     else:
         entity = EnkiModelUserPageData(user_id=self.user_id,
                                        route=route,
                                        data=data)
     entity.put()
Пример #3
0
	def post_user_page_data( self ):
	# post saved data if there is some corresponding to the page and the user is reauthenticated
		if self.is_reauthenticated():
			route =  self.request.path
			entity = EnkiModelUserPageData.get_by_user_id_route( user_id = self.user_id, route = route )
			if entity:
				post_data = entity.data
				entity.key.delete()
				self.post_reauthenticated( post_data )
				return True
		return False
Пример #4
0
 def post_user_page_data(self):
     # post saved data if there is some corresponding to the page and the user is reauthenticated
     if self.is_reauthenticated():
         route = self.request.path
         entity = EnkiModelUserPageData.get_by_user_id_route(
             user_id=self.user_id, route=route)
         if entity:
             post_data = entity.data
             entity.key.delete()
             self.post_reauthenticated(post_data)
             return True
     return False