@app.route('/public')
def public_timeline():
 return render_template('timeline.html', messages=query_db('\n        select message.*, user.* from message, user\n        where message.author_id = user.user_id\n        order by message.pub_date desc limit ?', [PER_PAGE]))

@ app . route ( '/public' ) def public_timeline ( ) : return render_template ( 'timeline.html' , messages = query_db ( '\n        select message.*, user.* from message, user\n        where message.author_id = user.user_id\n        order by message.pub_date desc limit ?' , [ PER_PAGE ] ) )
displays the latest messages of all users .