In my flask application which I use flask-migrate and Alembic I got this URL" /user/1?sort=ascmonkey=< flask_sqlalchemy.Pagination+object+at+0x7f6a8077ea10 >",while this part is extra < flask_sqlalchemy.Pagination+object+at+0x7f6a8077ea10 > where is it come from and how can I get rid of that?Thanx
View.py:
@layout.route('/user/<int:page>', methods = ['GET', 'POST'])
def user(page=1, sort='normal'):
user = g.user
#condition to sort base on ascending
if request.args.get('sort') =='asc':
sortBy = 'asc'
monkey = Users.query.order_by(Users.name.asc()).paginate(page, MONKEYS_PAGE)
MONKEYS_PAGE)
return render_template('Users.html',
user = user,
title ='Home',
monkey = monkey,
sortBy = sortBy
)
User.html
<div class="text-right sortby">
<span>Sort by</span>
<a href="{{ url_for('layout.user', page = '1', sort = 'asc', monkey = monkey) }}" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-sort-by-alphabet"></span>
name
</a>
<a href="{{ url_for('layout.user', page = '1', sort = 'friendnum', monkey = monkey) }}" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-link"></span>
number of friends
</a>
<a href="{{ url_for('layout.user', page = '1', sort = 'bf', monkey = monkey) }}" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-link"></span>
name of best friends
</a>
</div>