From 4715b12864843668b2cc0f64891c823214053650 Mon Sep 17 00:00:00 2001 From: Tomek Dubrownik Date: Tue, 24 Apr 2012 07:55:54 +0200 Subject: [PATCH] serving index --- README | 8 ++++++++ test/static.py | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README b/README index e69de29..6a70080 100644 --- a/README +++ b/README @@ -0,0 +1,8 @@ +Test server: +w ./test znajduje się trywialna aplikacja flaskowa i konfig do uwsgi, pozwalający się pobawić. + +usage: +itanic$ cd test +itanic$ uwsgi static.ini + +a potem skierować przeglądarkę na itanic:9091. Port jest w static.ini. diff --git a/test/static.py b/test/static.py index e6713e0..ec12ba2 100644 --- a/test/static.py +++ b/test/static.py @@ -1,2 +1,5 @@ -from flask import Flask -app = Flask(__name__, static_folder='../', static_url_path='') +from flask import Flask, render_template +app = Flask(__name__, static_folder='../', static_url_path='', template_folder='../') +@app.route('/') +def index(): + return render_template('index.html')