more flaskification
This commit is contained in:
parent
b71a1cda17
commit
2613f185f3
4 changed files with 10 additions and 3 deletions
13
site/app.py
13
site/app.py
|
@ -1,12 +1,19 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from flask import Flask
|
||||
from flask import Flask, render_template, make_response
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello_world():
|
||||
return render_template('index.html')
|
||||
def index():
|
||||
return render_template('index.j2')
|
||||
|
||||
@app.route('/assets/index.css')
|
||||
def indexStyle():
|
||||
css = render_template('assets/index.css')
|
||||
response = make_response(css)
|
||||
response.mimetype = "text/css"
|
||||
return response
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host="0.0.0.0", port=8080)
|
||||
|
|
Loading…
Add table
Reference in a new issue