first quick pass of user menu in navbar which shows simple read only prefs content, and a logout option that works
This commit is contained in:
13
options.py
13
options.py
@@ -1,5 +1,6 @@
|
||||
from settings import Settings, SettingsRBPath, SettingsIPath, SettingsSPath
|
||||
from flask_login import current_user
|
||||
from flask import request, render_template, redirect, url_for
|
||||
from flask_login import login_required, current_user
|
||||
from main import db, app, ma
|
||||
from shared import PA
|
||||
|
||||
@@ -145,3 +146,13 @@ class Options(PA):
|
||||
|
||||
db.session.add(pref)
|
||||
db.session.commit()
|
||||
|
||||
################################################################################
|
||||
# /prefs -> GET only -> prints out list of all prefs (simple for now)
|
||||
################################################################################
|
||||
@app.route("/prefs", methods=["GET"])
|
||||
@login_required
|
||||
def prefs():
|
||||
prefs = PA_PREF.query.filter( PA_PREF.pa_user_dn==current_user.dn ).all()
|
||||
return render_template("prefs.html", prefs=prefs )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user