Bottle Tutorial: TODO List Application Bug

When I entered Japanese in the body of the list in the official document Tutorial of Python's web application framework Bottle, the characters were garbled and it was solved, so make a note.

Garbled Japanese characters for TODO items

When I entered the text of the TODO item in Japanese, garbled characters occurred. Code of ** new_itme (): ** and ** edit_item (): ** in todo.py Correct and solve as follows!

Line 24 (after correction)

todo.py 


new = request.query.task.strip()

Line 45 (after correction)

todo.py


edit = request.query.task.strip()

Other defects

There were other problems, but I was able to solve them by referring to the following site.

――When I wrote and executed the sample code before the Japanese characters were garbled, it didn't work.

Bottle's TODO tutorial doesn't work and how to deal with it

--The list can no longer be displayed when the TODO item has more than 2 digits.

Problems with the Bottle Tutorial

Recommended Posts

Bottle Tutorial: TODO List Application Bug
Web application using Bottle (1)
Create Django Todo list
Create ToDo List [Python Django]
I tried to make a todo application using bottle with python