使用python制作静态登录界面 发表于 2017-04-09 | 代码1234567891011121314151617from bottle import run,get,post,request,static_file,route@route('/login') def login_html(): return static_file('index.html',root='.')@route('/login/:filename') def login_css(filename): return static_file('test.css',root='.')@post('/login') def login_submit(): name = request.forms.get('username') passwd = request.forms.get('password') if name == "qzdchw" and passwd == "123456": return "<p>欢迎登录</p>"+name else : return "<p>密码错误</p>" run(host='localhost',port=9999,debug=True)