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"
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)
def write(): mdiary = showHistory() # write.tpl is template for this code return template('write.tpl', diary=mdiary)
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)
def write(): mydiary = showHistory() return template('hallo.tpl', contents=mydiary)