diff --git a/sites/slds.py b/sites/slds.py index 6e5692a..305eda5 100644 --- a/sites/slds.py +++ b/sites/slds.py @@ -6,6 +6,7 @@ import json import schedule import time import db +import website app = Flask(__name__) @@ -31,7 +32,7 @@ def index(): # Get website data data = db.get_website_data(host) # Render as HTML - return render_template_string(data) + return website.render(data) @app.route('/') diff --git a/sites/website.py b/sites/website.py new file mode 100644 index 0000000..e03862b --- /dev/null +++ b/sites/website.py @@ -0,0 +1,5 @@ +from flask import Flask, make_response, redirect, render_template_string, request, jsonify, render_template, send_from_directory + + +def render(data): + return render_template_string(data) \ No newline at end of file