From 6cdb977c81bb6062bd39815337e6afa502068722 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 12 Jun 2011 18:39:38 -0400 Subject: [PATCH] template render --- httpbin/core.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/httpbin/core.py b/httpbin/core.py index 285de0e..68ffb1d 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -9,8 +9,10 @@ This module provides the core HttpBin experience. import json +from flask import Flask, request, render_template + + -from flask import Flask, request app = Flask(__name__) @@ -19,9 +21,16 @@ def to_json(*args, **kwargs): data = dict(*args, **kwargs) return json.dumps(data) + + +# ------ +# Routes +# ------ + + @app.route('/') def view_help(): - render_template('httpbin.1.html') + return render_template('httpbin.1.html') @app.route('/headers')