Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bottle
- import bottle_mysql
- from bottle import route, run, template, app
- app = bottle.Bottle()
- plugin = bottle_mysql.Plugin(dbuser='root', dbpass='toor', dbname='database')
- app.install(plugin)
- @route('/show/<a>')
- def show(a, db):
- db.execute('SELECT * FROM table WHERE a > "%d"', (a,))
- return template('Hello {{name}}, how are you?', name=a)
- run(host='192.168.1.19', port=8080, debug=True)
- TypeError('show() takes exactly 2 arguments (1 given)',)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement