serving index

master
Tomek Dubrownik 2012-04-24 07:55:54 +02:00
parent 7752a8b4a2
commit 4715b12864
2 changed files with 13 additions and 2 deletions

8
README
View File

@ -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.

View File

@ -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')