Beispiel #1
0
	def POST(self):
		# password gaurentees someone IN open ears ends the pair
		form = web.input(warrior="warrior", netid   ="netid",
						 notes  ="notes"  , password="******")
		
		if form.password == cv.secret([3,3,1]):
			#friend types netID and uses it to pair
			sheet = cv.open_sheet('Friend-List')
			name_col  = cv.search_row(sheet, 1, 'name')
			netid_col = cv.search_row(sheet, 1, 'netid')
			row_num = cv.search_column(sheet, netid_col, form.netid)

			# find the name of the user within the sheet
			name_values = sheet.col_values(name_col)
			friend = name_values[row_num - 1]
		
		
			pair = [form.warrior, friend]
			#removes given pair from Current-Pairings 
			#and updates status in All-Pairings
			if cv.remove_pair(pair) == 'Pair Removed':
					if cv.update_all_pair(pair, form.notes) == 'Pair Does Not Exist':
						pair = [['PAIR NOT'],['FOUND']]
			else:
				pair = [['PAIR NOT'],['FOUND']]
			
			data = [pair, form.notes]
		else:
			#extras because len(1 and 2) conditionals already taken
			data = ["Incorrect Password! Please try again.",3 ,4]
		
		return render.end_pair(table = data)
Beispiel #2
0
	def POST(self):
		form = web.input(password = '******')
		if form.password == cv.secret([3,3,1]):
			raise web.seeother('98hwerfyvug97843q870fv870324fv')
		else:
			error = ["Incorrect password! Please try again."]
			return render.end_pair_start(message = error)
Beispiel #3
0
	def POST(self):
		form = web.input(password = '******')
		if form.password == cv.secret([3,3,0]):
			raise web.seeother('o8908wqhfepvuhi08ehpqi87dhvuihoia87sh0dvu')
		else:
			error = ["Incorrect password! Please try again."]
			return render.interface(message = error)
Beispiel #4
0
	def POST(self):
		form = web.input(password = '******')
		if form.password == cv.secret([3,3,0]):
			raise web.seeother('o8908wqhfepvuhi08ehpqi87dhvuihoia87sh0dvu')
		else:
			error = ["Incorrect password! Please try again."]
			return render.interface(message = error)