Last active
April 23, 2020 02:59
-
-
Save codenoid/63710baf5b653a2ea9284ccc7eab2cc7 to your computer and use it in GitHub Desktop.
Flask handle 404 with rickroll
This file contains 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
@app.errorhandler(404) | |
def handle404(error): | |
html = "<center>" | |
html += "<br><br><br>" | |
html += '<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?controls=0&autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>' | |
html += "<br>" | |
html += "nothing to do here :p" | |
html += "</center>" | |
return html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment