diff options
-rw-r--r-- | libpathod/app.py | 13 | ||||
-rw-r--r-- | libpathod/templates/frame.html | 8 | ||||
-rw-r--r-- | libpathod/templates/index.html | 6 |
3 files changed, 19 insertions, 8 deletions
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 @@ <div class="container"> <a class="brand" href="/">Pathod</a> <ul class="nav"> - <li {% if section== "main" %} class="active" {% end %}><a href="/">Main</a></li> - <li {% if section== "log" %} class="active" {% end %}><a href="/log">Log</a></li> - <li {% if section== "help" %} class="active" {% end %}><a href="/help">Help</a></li> + <li {% if section== "main" %} class="active" {% endif %}><a href="/">Main</a></li> + <li {% if section== "log" %} class="active" {% endif %}><a href="/log">Log</a></li> + <li {% if section== "help" %} class="active" {% endif %}><a href="/help">Help</a></li> </ul> </div> </div> @@ -29,7 +29,7 @@ <div class="container"> {% block body %} - {% end %} + {% endblock %} <hr> <p>by <a href="http://corte.si">Aldo Cortesi</a> </p> 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 %} |