Skip to content

Commit

Permalink
added edit link to user.html
Browse files Browse the repository at this point in the history
  • Loading branch information
JayKayAce committed Jul 12, 2019
1 parent f1e14f1 commit 1b07f59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file modified app.db
Binary file not shown.
2 changes: 1 addition & 1 deletion app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def before_request():
@app.route("/edit_profile", methods = ["GET","POST"])
@login_required
def edit_profile():
form = EditProfileForm
form = EditProfileForm()
if form.validate_on_submit():
current_user.username = form.username.data
current_user.about_me = form.about_me.data
Expand Down
3 changes: 3 additions & 0 deletions app/templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ <h1>User: {{ user.username }}</h1>
</td>
</tr>
</table>
{% if user == current_user %}
<a href="{{ url_for('edit_profile') }}">Edit Your Profile</a>
{% endif %}
<hr>
{% for post in posts %}
{% include "_post.html" %}
Expand Down

0 comments on commit 1b07f59

Please sign in to comment.