#!/usr/bin/env python
#
# Copyright (C) 2005 David Trowbridge
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#

from BZReactor import BZReactor
from twisted.web import server
from Nouvelle import tag, Twisted

class Hello(Twisted.Page):
    isLeaf = 1
    document = tag('html')[
                   tag('head') [
                       tag('title')[ "Hi" ],
                   ],
                   tag('body') [
                       tag('h3')[ "Hello World!" ],
                   ],
               ]

reactor = BZReactor ()
root = Hello ()
site = server.Site(root)
reactor.listenTCP(8080, site)
reactor.run ()

@@ -762,16 +762,40 @@
 USA.%0A#%0A%0A
+import BZFlag, Nouvelle%0A
 from BZR
@@ -875,23 +875,113 @@
 rt tag, 
-Twisted
+place, Twisted%0A%0Aclass MyTable(Nouvelle.ResortableTable):%0A    tableTag = tag ('table', border='1')
 %0A%0Aclass 
@@ -1252,27 +1252,418 @@
     
-%5D,%0A               %5D
+    tag('p') %5B place(%22dataTable%22) %5D%0A                   %5D,%0A               %5D%0A%0A    def render_dataTable (self, context):%0A        data = %5B%5D%0A%0A        for id in BZFlag.Players.keys():%0A            player = BZFlag.Players%5Bid%5D%0A            data.append(%5Bid, player.callsign%5D)%0A%0A        return MyTable (data, %5B%0A        Nouvelle.IndexedColumn('id', 0),%0A        Nouvelle.IndexedColumn('callsign', 1),%0A        %5D, id='players')
 %0A%0Are

make it use nouvelle's nifty ResortableTable stuff to show a list of current players