profileview
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
from flask import render_template
|
||||
from flask_classful import FlaskView
|
||||
|
||||
from flask_security.decorators import login_required
|
||||
from flask_security import current_user
|
||||
|
||||
from models import Item
|
||||
|
||||
"""
|
||||
Profile VIEW
|
||||
"""
|
||||
@@ -14,5 +19,9 @@ __version__text__ = "1"
|
||||
|
||||
class ProfileView(FlaskView):
|
||||
|
||||
@login_required
|
||||
def index(self):
|
||||
return render_template('profile.html')
|
||||
|
||||
useritems = Item.query.filter_by(uploader_id=current_user.id)
|
||||
|
||||
return render_template('profile.html', images=useritems)
|
||||
|
||||
Reference in New Issue
Block a user