Ejemplo n.º 1
0
	def post(self):
		self.username = self.request.get('username')
		self.height = self.request.get('height')
		self.weight = self.request.get('weight')
		self.blood_pressure = self.request.get('blood_pressure')
		self.diagnosis = self.request.get('diagnosis')
		self.notes = self.request.get('notes')

		m = Medical_Data(user_name = self.username, 
						 height = self.height, 
						 weight = self.weight, 
						 blood_pressure = self.blood_pressure, 
						 diagnosis = self.diagnosis,
						 notes = self.notes)
		m.put()
		self.redirect('/welcome')
Ejemplo n.º 2
0
	def post(self):
		self.username = self.request.get('username')
		u = Medical_Data.all().filter("user_name = ", self.username).get()
		#u = Medical_Data.all()
		#u.filter("user_name =", self.username)
		#if u is None:
		#	self.redirect('/welcome')
		#else:
		if u == None:
			self.render("viewmedicalchart.html")
		else:
			params = dict(username = u.user_name,
		 			  	  height = u.height, 
		 			  	  weight = u.weight,
		 			  	  bloodpressure = u.blood_pressure, 
		 			  	  diagnosis = u.diagnosis, 
		 			  	  notes = u.notes)
			
			self.render("viewmedicalchart.html", **params)