Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias4217 committed Oct 18, 2019
2 parents f0f6812 + d86640d commit 0098d6f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions jukebox/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ def get_style():
return stylesheet


def get_nav_links():
if "NAV_LINKS" in app.config:
return app.config["NAV_LINKS"]
else:
return []


@main.route("/app")
@requires_auth
def app_view():
# app.logger.info("App access from %s", session["user"])
return render_template("accueil.html",
user=session["user"], jk_name=app.config["JK_NAME"],
stylesheet=get_style(), navlinks=app.config["NAV_LINKS"])
stylesheet=get_style(), navlinks=get_nav_links())


@main.route("/")
Expand All @@ -49,7 +56,7 @@ def help():
modules.append(i)
return render_template("help.html", modules=modules,
jk_name=app.config["JK_NAME"],
stylesheet=get_style(), navlinks=app.config["NAV_LINKS"],
stylesheet=get_style(), navlinks=get_nav_links(),
version=app.version)


Expand Down Expand Up @@ -80,11 +87,11 @@ class SettingsForm(FlaskForm):
# app.logger.info("Style : " + style)
return render_template('settings.html', user=session["user"],
jk_name=app.config["JK_NAME"], form=form,
stylesheet=get_style(), navlinks=app.config["NAV_LINKS"])
stylesheet=get_style(), navlinks=get_nav_links())
elif request.method == 'GET':
return render_template('settings.html', user=session["user"],
jk_name=app.config["JK_NAME"], form=form,
stylesheet=get_style(), navlinks=app.config["NAV_LINKS"])
stylesheet=get_style(), navlinks=get_nav_links())


@main.route("/sync")
Expand Down Expand Up @@ -166,7 +173,7 @@ def statistics():
date=datetime.datetime.now()
- datetime.timedelta(days=1)),

stylesheet=get_style(), navlinks=app.config["NAV_LINKS"])
stylesheet=get_style(), navlinks=get_nav_links())


@main.route("/status", methods=['GET'])
Expand Down

0 comments on commit 0098d6f

Please sign in to comment.