Ejemplo n.º 1
0
	def get(a):
		hardwareType = a		
		cur = mysql.connect().cursor()
		cur.execute("select * from mugsy.pinMappings WHERE hardwareType=(%s)",hardwareType)
		r = [dict((cur.description[i][0], value)
			for i, value in enumerate(row)) for row in cur.fetchall()]
		return {'pinInfo' : r }
Ejemplo n.º 2
0
	def get(a):
		coffeeTypeId = a		
		cur = mysql.connect().cursor()
		cur.execute("select * from mugsy.coffeeTypes WHERE coffeeTypeId=(%s)",coffeeTypeId)
		r = [dict((cur.description[i][0], value)
			for i, value in enumerate(row)) for row in cur.fetchall()]
		return {'brewSettings' : r}
Ejemplo n.º 3
0
	def get(a):
		user = a		
		cur = mysql.connect().cursor()
		cur.execute("select * from mugsy.brewSettings WHERE userID=(%s)",user)
		r = [dict((cur.description[i][0], value)
			for i, value in enumerate(row)) for row in cur.fetchall()]
		return {'brewSettings' : r}
Ejemplo n.º 4
0
	def get(self):
		count = 1
		while(count < 12):
			contents = scan()
			count = len(contents)
			duringScan()
		else:  
			for line in open("/var/mugsy/decaf/helpers/upc.txt"):
				last=line
				barcode = [last.rstrip('\n')]
				afterScan()
		cur = mysql.connect().cursor()
		cur.execute("select * from mugsy.coffeeTypes WHERE upc=(%s)",barcode)
		r = [dict((cur.description[i][0], value)
			for i, value in enumerate(row)) for row in cur.fetchall()]
		return {'coffeeInfo' : r}