Show profile picture on profiles, renamed var to use _ instead of - for compatibility
This commit is contained in:
parent
34eda46c87
commit
863eb395b3
2 changed files with 6 additions and 2 deletions
|
@ -137,8 +137,8 @@ def user_settings():
|
|||
'location': request.form['location']
|
||||
}
|
||||
if 'profile-pic' in request.files.keys():
|
||||
profile_pic = files.upload_file(request.files['profile-pic'])
|
||||
profile['profile-pic'] = profile_pic
|
||||
profile_pic = files.upload_file(request.files['profile_pic'])
|
||||
profile['profile_pic'] = profile_pic
|
||||
accounts.set_theme(session['username'].lower(), request.form['theme'])
|
||||
username = session['username']
|
||||
accounts.update_profile(username, profile)
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="jumbotron">
|
||||
{% if user.profile.profile_pic %}
|
||||
<img src="/files/{{ user.profile.profile_pic }}" class="rounded-circle float-left" style="margin-right: 24px; max-height: 100px;"/>
|
||||
{% endif %}
|
||||
<h1>{% if user.verified %} <i class="fas fa-shield-check" alt="Verified"></i> {% endif %}{{ user.displayname }} <small>on Tweeder</small></h1>
|
||||
<h2>
|
||||
{% if user.profile.bio %}
|
||||
|
@ -11,6 +14,7 @@
|
|||
Tweeder user since 1984
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
Loading…
Add table
Reference in a new issue