Ejemplo n.º 1
0
	def populate_profile(self, *args):
		
		self.user_pictures.clear_widgets()
		self.tag_grid.clear_widgets()

		this_user = User_Requests.get_info(
			UserStore.get('user_info')['id'],
			UserStore.get('user_info')["token"]
		)

		for pic in this_user['data']['pictures']:
			self.user_pictures.add_widget(
				AsyncImage(source=pic)
			)
		
		for tag in this_user['data']['tags']:
			self.tag_grid.add_widget(
				OutlinedButton(text='#' + tag)
			)

		self.fullname.text = this_user['data']["First_Name"] + " " + this_user['data']["Last_Name"]

		if this_user['data']["Description"] is not None or this_user['data']["Description"] == '':
			self.description.size_hint_y = None
			self.description.text = this_user['data']["Description"]
		else:
			self.description.size_hint_y = 0

		self.getText(this_user)

		UserStore.put('current_user', data=this_user['data'])
Ejemplo n.º 2
0
	def populate_match(self, uid=None):

		UserStore.put('curr_profile', id=UserStore.get('curr_profile')['id'], viewed=True)

		this_user = User_Requests.get_info(
			uid,
			UserStore.get('user_info')["token"]
		)

		for pic in this_user['data']['pictures']:
			self.user_pictures.add_widget(
				AsyncImage(source=pic)
			)
		
		for tag in this_user['data']['tags']:
			self.tag_grid.add_widget(
				OutlinedButton(text='#' + tag)
			)

		self.user_id = str(uid)
		self.fullname.text = this_user['data']["First_Name"] + " " + this_user['data']["Last_Name"]

		if this_user['data']["Description"] is not None or this_user['data']["Description"] == '':
			self.description.size_hint_y = None
			self.description.text = this_user['data']["Description"]
		else:
			self.description.size_hint_y = 0

		self.getText(this_user)