Beispiel #1
0
def create_account():
	info = controller.get_basic_info()
	if request.method == 'GET':
		return render_template("create_account.html", most_recent_event=info['recent'], 
			featured_event=info['featured'])
	else:
		new_user = controller.process_signup(request.form)
		confirmation_email = controller.send_email("Welcome to inStep!", 
			request.form['email'], "*****@*****.**", 
			"Your inStep account has been created.")
		user = controller.get_user_by_id(new_user.id)
		session['id'] = new_user.id
		flash("Your account has been created!")
		return redirect("/")
Beispiel #2
0
def all_the_tests():
	test_results = ""
	if controller.get_user_by_id(1):
		test_results += "Get_User function passed, "
	else:
		test_results += "Get_User function failed, "

	if controller.get_event_by_id(1):
		test_results += "Get_Event function passed, "
	else:
		test_results += "Get_Event function failed, "

	if controller.process_basic_search("cha-cha", "South Bay"):
		test_results += "Process_Basic_Search function passed, "
	else:
		test_results += "Process_Basic_Search function failed, "

	return test_results