diff --git a/__pycache__/main.cpython-39.pyc b/__pycache__/main.cpython-39.pyc index 88ded3b..c544e39 100644 Binary files a/__pycache__/main.cpython-39.pyc and b/__pycache__/main.cpython-39.pyc differ diff --git a/__pycache__/plots.cpython-39.pyc b/__pycache__/plots.cpython-39.pyc index 5bc2636..3cec243 100644 Binary files a/__pycache__/plots.cpython-39.pyc and b/__pycache__/plots.cpython-39.pyc differ diff --git a/flaskapp.py b/flaskapp.py index 1f75b6e..89d481b 100644 --- a/flaskapp.py +++ b/flaskapp.py @@ -1,17 +1,16 @@ -import io from flask import Flask, render_template app = Flask("Project Numeri") -from plots import Cijferlijst -import base64 -cf = Cijferlijst() +#from plots import Cijferlijst + +#cf = Cijferlijst() import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure +from plots import plot @app.route('/') def index(): return render_template('index.html', title="joe", imgdata=None) - def RunWeb(): app.run(debug=True, port=5002) diff --git a/main.py b/main.py index d302f3f..2d7ae8d 100644 --- a/main.py +++ b/main.py @@ -1,40 +1,19 @@ # based on https://gist.github.com/rduplain/1641344 import random -import io - +from io import BytesIO +import base64 from flask import Flask, make_response, request from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure +import plots app = Flask(__name__) @app.route('/') -def root() : - return "