[tor-commits] [compass/master] Return a standard response for index.html, not a template.
karsten at torproject.org
karsten at torproject.org
Mon Jan 7 07:09:40 UTC 2013
commit fa0b754df096c7699d8255717088e08789e7457c
Author: Chris Wacek <cwacek at cs.georgetown.edu>
Date: Thu Dec 20 16:30:51 2012 -0500
Return a standard response for index.html, not a template.
---
app.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/app.py b/app.py
index 67f4608..6f098b9 100644
--- a/app.py
+++ b/app.py
@@ -2,7 +2,7 @@ import os
import re
import compass
from util import Result,Boolean,NullFn,Int,Container
-from flask import Flask, request, jsonify, render_template
+from flask import Flask, request, jsonify, render_template,Response
app = Flask(__name__)
@@ -109,9 +109,11 @@ def parse(output_string, grouping=False, sort_key=None):
return results if results else sorted_results
+
@app.route('/')
-def index():
- return render_template('index.html')
+def index():
+ return app.open_resource("templates/index.html").read()
+
@app.route('/result', methods=['GET'])
def result():
More information about the tor-commits
mailing list