|
@ -23,7 +23,8 @@ def index(): |
|
|
@main.route('/user/<username>') |
|
|
@main.route('/user/<username>') |
|
|
def user(username): |
|
|
def user(username): |
|
|
user = User.query.filter_by(username=username).first_or_404() |
|
|
user = User.query.filter_by(username=username).first_or_404() |
|
|
return render_template('user.html', user=user) |
|
|
|
|
|
|
|
|
posts = user.posts.order_by(Post.timestamp.desc()).all() |
|
|
|
|
|
return render_template('user.html', user=user, posts=posts) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/edit-profile', methods=['GET', 'POST']) |
|
|
@main.route('/edit-profile', methods=['GET', 'POST']) |
|
|