예제 #1
0
def response(data):
	keyword = data[1]
	if keyword == 'a':
		diary.showHistory()
	elif keyword == 'l':
		diary.showLine()
	elif keyword == 'i':
		diary.inputDiary(data[-1])
	elif keyword == 'e':
		diary.emptyDiary()
	else: 
		print "CMD error"
예제 #2
0
def do_write():
	diary_log = request.forms.get('diary_log')
	inputDiary(diary_log) #read in
	mydiary = showHistory() # read out to shows
	print(mydiary)
	print('\n')
	return template('write.tpl', diary=mydiary)
예제 #3
0
def write():
	mdiary = showHistory()
	# write.tpl is template for this code
	return template('write.tpl', diary=mdiary)
예제 #4
0
파일: test2.py 프로젝트: Langzzx/OMOOC2py
def do_write():
	diary_log = request.forms.get('diary_log')
	inputDiary(diary_log) #read in
	mydiary = showHistory() # read out to shows
	return template('hallo.tpl', contents=mydiary)
예제 #5
0
파일: test2.py 프로젝트: Langzzx/OMOOC2py
def write():
	mydiary = showHistory()
	return template('hallo.tpl', contents=mydiary)