Changed formatting on time shown for last api update.
This commit is contained in:
parent
4e17a20c26
commit
4183ef6df8
@ -40,7 +40,7 @@
|
|||||||
<li><span id="vocab-num"></span> Vocabulary</li>
|
<li><span id="vocab-num"></span> Vocabulary</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="api-refresh" class="navbar-text" data-toggle="tooltip" data-placement="bottom" title="Last API Refresh: {{ current_user.last_updated }}. Click to refresh."><span><img alt="avatar" src="http://www.gravatar.com/avatar/{{ current_user.gravatar }}?s=24"></span> {{ current_user.username }}</li>
|
<li id="api-refresh" class="navbar-text" data-toggle="tooltip" data-placement="bottom" title="Last API Refresh: {{ current_user.last_updated|datetime_format }}. Click to refresh."><span><img alt="avatar" src="http://www.gravatar.com/avatar/{{ current_user.gravatar }}?s=24"></span> {{ current_user.username }}</li>
|
||||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,6 +209,12 @@ def logout():
|
|||||||
def unauthorized():
|
def unauthorized():
|
||||||
return redirect(url_for('show_home'))
|
return redirect(url_for('show_home'))
|
||||||
|
|
||||||
|
|
||||||
|
def datetime_format(input):
|
||||||
|
return input.strftime("%d %B %Y %I:%M%p")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
app.jinja_env.filters['datetime_format'] = datetime_format
|
||||||
app.run(threaded=True, port=app.config['PORT'])
|
app.run(threaded=True, port=app.config['PORT'])
|
||||||
|
Loading…
Reference in New Issue
Block a user