Revision: 8108
http://svn.sourceforge.net/mailman/?rev=8108&view=rev
Author: mindlace23
Date: 2006-12-04 19:04:00 -0800 (Mon, 04 Dec 2006)
Log Message:
-----------
added traceback debugging and auto-reload middleware to HTTPRunner.py
Modified Paths:
--------------
branches/soc2006-webui/Mailman/Queue/HTTPRunner.py
branches/soc2006-webui/Mailman/WebUI/lists.py
branches/soc2006-webui/Mailman/WebUI/post.py
branches/soc2006-webui/Mailman/WebUI/wsgi_app.py
Modified: branches/soc2006-webui/Mailman/Queue/HTTPRunner.py
===================================================================
--- branches/soc2006-webui/Mailman/Queue/HTTPRunner.py 2006-12-05 02:37:17 UTC
(rev 8107)
+++ branches/soc2006-webui/Mailman/Queue/HTTPRunner.py 2006-12-05 03:04:00 UTC
(rev 8108)
@@ -29,8 +29,10 @@
if config.WEB_INTERFACE == 'classic':
from Mailman.Cgi.wsgi_app import mailman_app
if config.WEB_INTERFACE == 'new':
- from Mailman.WebUI.wsgi_app import WebUI
- mailman_app = WebUI()
+ import memento
+ app = memento.Assassin("Mailman.WebUI.wsgi_app:WebUI()",["Mailman.WebUI"])
+ from paste.evalexception import EvalException
+ mailman_app = EvalException(app)
hlog = logging.getLogger('mailman.http')
qlog = logging.getLogger('mailman.qrunner')
Modified: branches/soc2006-webui/Mailman/WebUI/lists.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/lists.py 2006-12-05 02:37:17 UTC
(rev 8107)
+++ branches/soc2006-webui/Mailman/WebUI/lists.py 2006-12-05 03:04:00 UTC
(rev 8108)
@@ -25,7 +25,7 @@
if self.context['bm'].anonymous:
self.add_piece('signin','controls')
- self.add_piece('lists','body')
+ self.add_piece('lists','body')
self.lists()
start_response('200 OK', [('content-type','application/xhtml+xml'),])
return self.render_template('content.html')
Modified: branches/soc2006-webui/Mailman/WebUI/post.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/post.py 2006-12-05 02:37:17 UTC
(rev 8107)
+++ branches/soc2006-webui/Mailman/WebUI/post.py 2006-12-05 03:04:00 UTC
(rev 8108)
@@ -0,0 +1,23 @@
+# Copyright (C) 2006 by the Free Software Foundation, Inc.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+from page import Page
+
+class Post(Page):
+ def __call__(self, environ, start_response):
+ start_response('200 OK', [('content-type','text/plain'),])
+ return ["you've posted"]
\ No newline at end of file
Modified: branches/soc2006-webui/Mailman/WebUI/wsgi_app.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/wsgi_app.py 2006-12-05 02:37:17 UTC
(rev 8107)
+++ branches/soc2006-webui/Mailman/WebUI/wsgi_app.py 2006-12-05 03:04:00 UTC
(rev 8108)
@@ -26,6 +26,7 @@
from Mailman.configuration import config
from Mailman.Utils import list_names
+
class WebUI(object):
def __init__(self):
self.config = config
@@ -51,7 +52,8 @@
return fa(environ, start_response)
if self.is_post_request(environ):
- post = Post()
+ from Mailman.WebUI.post import Post
+ post = Post(config)
return post(environ, start_response)
path = environ['PATH_INFO']
# render the lists page
@@ -64,9 +66,10 @@
if (pathparts[1] == 'newlist') or (pathparts[1] in self.list_names):
shift_path_info(environ)
return list(environ, start_response)
+
+ start_response('404 NOT FOUND', [('content-type','text/plain'),])
+ return ['no page here']
-
- environ['webui.form'] = formvars
def is_post_request(self, environ):
if environ['REQUEST_METHOD'].upper() != 'POST':
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org