Display username when logged in.
This commit is contained in:
parent
d5be15a827
commit
45eb4adff0
|
@ -75,10 +75,11 @@ def login_post():
|
||||||
@writing_blueprint.route('/', methods=['GET'])
|
@writing_blueprint.route('/', methods=['GET'])
|
||||||
def index_get():
|
def index_get():
|
||||||
global index_cache
|
global index_cache
|
||||||
if not index_cache:
|
if not index_cache or 'username' in session:
|
||||||
index_cache = render_template(
|
index_cache = render_template(
|
||||||
'writing.jinja2',
|
'writing.jinja2',
|
||||||
form=CLForm()
|
form=CLForm(),
|
||||||
|
username=session['username']
|
||||||
)
|
)
|
||||||
return index_cache
|
return index_cache
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
<h1><span class="logo left">Under</span><span class="logo right">Cover</span></h1>
|
<h1><span class="logo left">Under</span><span class="logo right">Cover</span></h1>
|
||||||
</a>
|
</a>
|
||||||
<h2>The secret cover letter generator</h2>
|
<h2>The secret cover letter generator</h2>
|
||||||
|
{% if username %}
|
||||||
|
<h3>You are logged in as {{ username }}</h3>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% from "_formhelpers.jinja2" import render_field %}
|
{% from "_formhelpers.jinja2" import render_field %}
|
||||||
<form method=post id="letter-form">
|
<form method=post id="letter-form">
|
||||||
|
|
Loading…
Reference in New Issue