Skip to content

Instantly share code, notes, and snippets.

Created Jul 9, 2016
What would you like to do?
【Python】Bottleで404 Not Foundページをカスタマイズする
from bottle import route, run, template, error
import os
def error404(error):
return template("<h1>{{error_message}}</h1>", error_message="404 Not Found.")
run(host="", port=int(os.environ.get("PORT", 5000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment