Hello world flask project.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 30 May 2018 19:10:43 +0000 (21:10 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 30 May 2018 19:10:43 +0000 (21:10 +0200)
Start development server with
FLASK_APP=seepark_web.py FLASK_DEBUG=1 flask run

web/seepark_web.py [new file with mode: 0644]
web/templates/seepark_web.html [new file with mode: 0644]

diff --git a/web/seepark_web.py b/web/seepark_web.py
new file mode 100644 (file)
index 0000000..9ff09e0
--- /dev/null
@@ -0,0 +1,7 @@
+from flask import Flask, render_template
+app = Flask(__name__)
+
+@app.route("/")
+def hello():
+    return render_template('seepark_web.html')
+
diff --git a/web/templates/seepark_web.html b/web/templates/seepark_web.html
new file mode 100644 (file)
index 0000000..287226b
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+       <head>
+               <!-- Load c3.css -->
+               <link href="{{url_for('static', filename='c3.css')}}" rel="stylesheet">
+
+               <!-- Load d3.js and c3.js -->
+               <script src="{{url_for('static', filename='d3.js')}}" charset="utf-8"></script>
+               <script src="{{url_for('static', filename='c3.js')}}"></script>
+               <title>Hi! :-)</title>
+       </head>
+       <body>
+               <h1>Hello world</h1>
+       </body>
+</html>