nopaque/app/profile/routes.py
2022-11-29 16:46:33 +01:00

25 lines
618 B
Python

from flask import render_template, url_for
from flask_login import current_user, login_required
from app import db
from app.models import User
from . import bp
@bp.route('')
@login_required
def profile():
user_image = 'static/images/user_avatar.png'
user_name = current_user.username
last_seen = current_user.last_seen
member_since = current_user.member_since
email = current_user.email
role = current_user.role
return render_template('profile/profile_page.html.j2',
user_image=user_image,
user_name=user_name,
last_seen=last_seen,
member_since=member_since,
email=email,
role=role)