Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/', methods=['POST', 'GET'])
- def index():
- if (request.args['search']):
- tag = request.args.get("tagname")
- query = "select * from quote,tags,quote_tags where quote.qid =
- quote_tags.qid and tags.tagid = quote_tags.tagid and tagname=" + str(tag)
- cur = connection.execute(query)
- rv = cur.fetchall()
- cur.close()
- return render_template('index.html', tag=rv)
- else:
- return render_template('index.html')
Add Comment
Please, Sign In to add comment