Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 3890:41948328f987
a couple more variables for tracker index templates per alex
Not sure what to do about utils and i18n. Those are both
tracker specific, I think. If you have multiple trackers which
utils and i18n do you use? If someone ever asks for that
we can tackle it then. The tracker index page should be
fairly simple. I imagine they mostly just want to have some
prettier HTML and/or CSS.
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Fri, 07 Sep 2007 20:27:46 +0000 |
| parents | 1165f2204542 |
| children | 410cae6ab7dd |
comparison
equal
deleted
inserted
replaced
| 3889:f7766d5ba962 | 3890:41948328f987 |
|---|---|
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 # | 16 # |
| 17 | 17 |
| 18 """Command-line script that runs a server over roundup.cgi.client. | 18 """Command-line script that runs a server over roundup.cgi.client. |
| 19 | 19 |
| 20 $Id: roundup_server.py,v 1.91 2007-09-03 17:26:42 jpend Exp $ | 20 $Id: roundup_server.py,v 1.92 2007-09-07 20:27:46 jpend Exp $ |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 24 import errno, cgi, getopt, os, socket, sys, traceback, urllib, time | 24 import errno, cgi, getopt, os, socket, sys, traceback, urllib, time |
| 25 import ConfigParser, BaseHTTPServer, SocketServer, StringIO | 25 import ConfigParser, BaseHTTPServer, SocketServer, StringIO |
| 241 | 241 |
| 242 if self.CONFIG and self.CONFIG['TEMPLATE']: | 242 if self.CONFIG and self.CONFIG['TEMPLATE']: |
| 243 template = open(self.CONFIG['TEMPLATE']).read() | 243 template = open(self.CONFIG['TEMPLATE']).read() |
| 244 pt = PageTemplate() | 244 pt = PageTemplate() |
| 245 pt.write(template) | 245 pt.write(template) |
| 246 extra = { 'trackers': self.TRACKERS } | 246 extra = { 'trackers': self.TRACKERS, |
| 247 'nothing' : None, | |
| 248 'true' : 1, | |
| 249 'false' : 0, | |
| 250 } | |
| 247 w(pt.pt_render(extra_context=extra)) | 251 w(pt.pt_render(extra_context=extra)) |
| 248 else: | 252 else: |
| 249 w(_('<html><head><title>Roundup trackers index</title></head>\n' | 253 w(_('<html><head><title>Roundup trackers index</title></head>\n' |
| 250 '<body><h1>Roundup trackers index</h1><ol>\n')) | 254 '<body><h1>Roundup trackers index</h1><ol>\n')) |
| 251 keys.sort() | 255 keys.sort() |
