How can I create a user-password login webpage using python bottle
when I run the following 开发者_开发知识库code it ended in Import error:cannot import name route Can anyone help me??
from bottle import route, run
@route('/:name')
def index(name='World'):
return '<b>Hello %s!</b>' % name
run(host='localhost', port=8080)
That example program is awful. It contains a cross-site scripting attack.
My guess is that you named the file you put your program in bottle.py
. Either that or you haven't installed bottle.
精彩评论