summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-08-31 11:55:19 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-08-31 11:58:27 +0200
commitdf2e425b346b95c6493a684025374b956349a0da (patch)
tree7dcceec2a1c7dc863ea98c733abd638a46e6656a /ogcp/views.py
parent0e160da4c03ebb197793f8ebd3ebf543b22bc566 (diff)
Add basic backend structure
This adds views functions and ogServer config loading.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
new file mode 100644
index 0000000..4b03d2d
--- /dev/null
+++ b/ogcp/views.py
@@ -0,0 +1,17 @@
+from flask import g, render_template, url_for
+from ogcp.og_server import OGServer
+from flask_babel import _
+from ogcp import app
+
+@app.before_request
+def load_config():
+ g.server = OGServer()
+ g.server.load_config('ogcp/cfg/ogserver.json')
+
+@app.route('/')
+def index():
+ return render_template('base.html')
+
+@app.route('/scopes/')
+def scopes():
+ return render_template('base.html')