Created
April 5, 2024 22:28
-
-
Save lordjabez/cf9cfad84d24af2078140cf6dd364b07 to your computer and use it in GitHub Desktop.
Redirect Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import request, route, run, redirect | |
redirect_url = 'https://example.com/foo | |
@route('/foo') | |
def job(): | |
requestor_id = request.query['requestor_id'] | |
print(f'{requestor_id} clicked the link') | |
redirect(redirect_url) | |
run(host='localhost', port=8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment