explorer.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:connectrum 作者: coinkite 项目源码 文件源码
def homepage(request):
    conn = request.app['conn']
    t = HTML_HDR
    t += "<h2>%s</h2>" % conn.server_info 

    # NOTE: only a demo program would do all these remote server
    # queries just to display the hompage...

    donate = await conn.RPC('server.donation_address')

    motd = await conn.RPC('server.banner')
    t += '<pre style="font-size: 50%%">\n%s\n</pre><hr/>' % motd

    t += '<p>Donations: %s</p>' % linkage(donate)
    t += '</p><p>Top block: %s</p>' % linkage(top_blk)

    t += '''
        <form method=POST action="/">
            <input name='q' style="width: 50%" placeholder="Txn hash / address / etc"></input>
    '''

    return Response(content_type='text/html', text=t)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号