示例#1
0
文件: peers.py 项目: udoprog/metap2p
 def new(self):
   self.path = ["Peers", "new"]
   
   return [
     T.form(action=url_for('peers'), method="POST")[
       T.input(name="peer_uri", type="text"),
       T.input(name="new_peer", type="submit", value="New Peer")
     ]
   ]
示例#2
0
文件: peers.py 项目: udoprog/metap2p
 def broadcast(self):
   self.path = ["Peers", "Broadcast"]
   
   return [
     T.h1()["Broadcast to All Peers"],
     T.form(action=url_for('peers_broadcast'), method="POST")[
       T.text_area(name="broadcast_message", cols="60", rows="20"),
       T.br(),
       T.file_input('broadcast_file'),
       T.br(),
       T.input(name="submit_broadcast_message", type="submit", value="Send Broadcast")
     ]
   ]