diff --git a/undercover/routes.py b/undercover/routes.py index 7b40925..c925510 100644 --- a/undercover/routes.py +++ b/undercover/routes.py @@ -75,10 +75,11 @@ def login_post(): @writing_blueprint.route('/', methods=['GET']) def index_get(): global index_cache - if not index_cache: + if not index_cache or 'username' in session: index_cache = render_template( 'writing.jinja2', - form=CLForm() + form=CLForm(), + username=session['username'] ) return index_cache diff --git a/undercover/templates/writing.jinja2 b/undercover/templates/writing.jinja2 index 90d7265..a07a2b5 100644 --- a/undercover/templates/writing.jinja2 +++ b/undercover/templates/writing.jinja2 @@ -41,6 +41,9 @@

The secret cover letter generator

+ {% if username %} +

You are logged in as {{ username }}

+ {% endif %} {% from "_formhelpers.jinja2" import render_field %}