diff options
Diffstat (limited to '')
-rw-r--r-- | app/model.py | 2 | ||||
-rw-r--r-- | app/views/__init__.py | 1 | ||||
-rw-r--r-- | templates/layout.jinja | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/app/model.py b/app/model.py index dd68ef3..ddacde2 100644 --- a/app/model.py +++ b/app/model.py @@ -54,7 +54,7 @@ class User (Model): __abstract__ = True name = ReqColumn(db.Unicode(50), unique = True) pwd = ReqColumn(db.Unicode(255)) - alias = Column(db.Unicode(50)) + description = Column(db.Unicode(100)) class UserModel (Model): __abstract__ = True diff --git a/app/views/__init__.py b/app/views/__init__.py index 101f393..c9d9e8f 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -23,6 +23,7 @@ __all__ = [ mobile_checks = ['J2ME', 'Opera Mini'] app.add_template_global(zip) +app.add_template_global(current_user) @app.before_request def handle_mobile(): diff --git a/templates/layout.jinja b/templates/layout.jinja index 0c70689..b3f821d 100644 --- a/templates/layout.jinja +++ b/templates/layout.jinja @@ -14,7 +14,9 @@ <div id="logo"> <img src="{{ "images/currency.png" | static_url }}"> <h1><a href="{{ url_for("index") }}">Kosten</a></h1> - <h2>» vom Nec</h2> + {% if current_user.is_authenticated() %} + <h2>» {{ current_user.description | default('von ' ~ current_user.name, true) }}</h2> + {% endif %} </div> <div id="header"> |