def on_show(request, page_name):
 revision_id = request.args.get('rev', type=int)
 query = RevisionedPage.query.filter_by(name=page_name)
 if revision_id:
  query = query.filter_by(revision_id=revision_id)
  revision_requested = True
 else:
  query = query.order_by(RevisionedPage.revision_id.desc())
  revision_requested = False
 page = query.first()
 if (page is None):
  return page_missing(request, page_name, revision_requested)
 return Response(generate_template('action_show.html', page=page))

def on_show ( request , page_name ) : revision_id = request . args . get ( 'rev' , type = int ) query = RevisionedPage . query . filter_by ( name = page_name ) if revision_id : query = query . filter_by ( revision_id = revision_id ) revision_requested = True else : query = query . order_by ( RevisionedPage . revision_id . desc ( ) ) revision_requested = False page = query . first ( ) if ( page is None ) : return page_missing ( request , page_name , revision_requested ) return Response ( generate_template ( 'action_show.html' , page = page ) )
displays the page the user requests .