mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	user settings page
This commit is contained in:
		
							
								
								
									
										5
									
								
								app/profile/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/profile/__init__.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
from flask import Blueprint
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bp = Blueprint('profile', __name__)
 | 
			
		||||
from . import routes  # noqa
 | 
			
		||||
							
								
								
									
										24
									
								
								app/profile/routes.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								app/profile/routes.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user