wip: backend
This commit is contained in:
@@ -3,6 +3,7 @@ import logging
|
||||
from logging import config
|
||||
import yaml
|
||||
from flask import Flask, render_template, redirect, request, url_for
|
||||
from thsf.backend import Backend
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -30,6 +31,9 @@ try:
|
||||
app.config["SECRET_KEY"] = app.local_config["app"]["secret_key"]
|
||||
app.config["LANGUAGES"] = app.local_config["app"]["languages"]
|
||||
config.dictConfig(app.local_config["log"])
|
||||
backend = Backend(url=app.local_config["pretalx"]["url"],
|
||||
apiprefix=app.local_config["pretalx"]["apiprefix"],
|
||||
apikey=app.local_config["pretalx"]["apikey"])
|
||||
except Exception as err:
|
||||
logger.critical("[{}] {}".format(err.__class__, str(err)))
|
||||
sys.exit(1)
|
||||
@@ -56,6 +60,7 @@ def index():
|
||||
|
||||
@app.route('/planning', methods=['GET'])
|
||||
def planning():
|
||||
backend.get(endpoint=f"events/{app.local_config['pretalx']['event']}/schedules/{app.local_config['pretalx']['schedule']}")
|
||||
return "planning"
|
||||
|
||||
@app.route('/concerts', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user