From f88e899274b097317db496245758181b43c1d72a Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 21 Jun 2012 16:25:27 +1200 Subject: Built-in app: Index page. --- libpathod/app.py | 13 ++++++++++++- libpathod/templates/frame.html | 8 ++++---- libpathod/templates/index.html | 6 +++--- 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'libpathod') diff --git a/libpathod/app.py b/libpathod/app.py index 1e65bc4f..2a738b58 100644 --- a/libpathod/app.py +++ b/libpathod/app.py @@ -1,5 +1,8 @@ -from flask import Flask, jsonify +import logging +from flask import Flask, jsonify, render_template import version + +logging.basicConfig(level="DEBUG") app = Flask(__name__) @app.route('/api/info') @@ -22,6 +25,14 @@ def api_clear_log(): return "OK" + +@app.route('/') +@app.route('/index.html') +def index(): + return render_template("index.html", name="index", section="main") + + + """ class _Page(tornado.web.RequestHandler): def render(self, name, **kwargs): diff --git a/libpathod/templates/frame.html b/libpathod/templates/frame.html index b0c298b6..3dd7fbf8 100644 --- a/libpathod/templates/frame.html +++ b/libpathod/templates/frame.html @@ -18,9 +18,9 @@
Pathod
@@ -29,7 +29,7 @@
{% block body %} - {% end %} + {% endblock %}

by Aldo Cortesi

diff --git a/libpathod/templates/index.html b/libpathod/templates/index.html index 396137d6..07145b85 100644 --- a/libpathod/templates/index.html +++ b/libpathod/templates/index.html @@ -1,4 +1,4 @@ -{% extends frame.html %} +{% extends "frame.html" %} {% block body %} - {% include previewform.html %} -{% end %} + {% include "previewform.html" %} +{% endblock %} -- cgit v1.2.3