Forked from carc1n0gen/flask-domain-matching.py
Last active
February 22, 2021 09:10
-
-
Save bodik/3d62e88075cedcea72f3fe7869d49d32 to your computer and use it in GitHub Desktop.
Flask Graph Image
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
from flask import Flask, send_file, url_for | |
app = Flask(__name__) | |
@app.route('/page1') | |
def page1(): | |
# would be a render_template() at last | |
return '<img src="' + url_for('image1') + '">' | |
@app.route('/image1') | |
def image1(): | |
# do magic here with https://www.kaggle.com/kmader/visualizing-graph-traversal | |
return send_file('produced_file.gif', mimetype='image/gif') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment