Exemple #1
0
 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")
     ]
   ]
Exemple #2
0
 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")
     ]
   ]