Revision: 8080
          http://svn.sourceforge.net/mailman/?rev=8080&view=rev
Author:   mindlace23
Date:     2006-10-23 12:32:38 -0700 (Mon, 23 Oct 2006)

Log Message:
-----------
Templates successfully rendering!

Modified Paths:
--------------
    branches/soc2006-webui/Mailman/WebUI/lists.py
    branches/soc2006-webui/Mailman/WebUI/page.py
    branches/soc2006-webui/Mailman/WebUI/wsgi_app.py

Modified: branches/soc2006-webui/Mailman/WebUI/lists.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/lists.py       2006-10-23 19:10:11 UTC 
(rev 8079)
+++ branches/soc2006-webui/Mailman/WebUI/lists.py       2006-10-23 19:32:38 UTC 
(rev 8080)
@@ -26,8 +26,8 @@
             self.add_piece('signin','controls')
             
         self.lists()
-        start_response('200 OK', [('content-type','application/xhtml+xml')])
-        self.render_template('content.html')
+        start_response('200 OK', [('content-type','application/xhtml+xml'),])
+        return self.render_template('content.html')
 
     def lists(self):
         names = list_names()

Modified: branches/soc2006-webui/Mailman/WebUI/page.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/page.py        2006-10-23 19:10:11 UTC 
(rev 8079)
+++ branches/soc2006-webui/Mailman/WebUI/page.py        2006-10-23 19:32:38 UTC 
(rev 8080)
@@ -21,18 +21,16 @@
 
 class Page(object):
     def __init__(self, config):
-        sp = join(config.VAR_PREFIX,'Mailman/WebUI/templates')
-        print sp
-        self.template_loader = TemplateLoader(
-            search_path=sp,
-            auto_reload=True)
+        self.base_path = join(config.VAR_PREFIX,'Mailman/WebUI/templates/')
+        self.template_loader = TemplateLoader(auto_reload=True)
         self.context = {'bm': BiteMarks(), 'moderationRequests': doNothing,
         'location': doNothing, 'pieces': []
         }
         
     def render_template(self, template_name, context=None):
         if not context: context = self.context
-        template = self.template_loader.load(template_name)
+        fullpath = join(self.base_path,template_name)
+        template = self.template_loader.load(fullpath)
         stream = template.generate(**context)
         return stream.render(method='xhtml')
         

Modified: branches/soc2006-webui/Mailman/WebUI/wsgi_app.py
===================================================================
--- branches/soc2006-webui/Mailman/WebUI/wsgi_app.py    2006-10-23 19:10:11 UTC 
(rev 8079)
+++ branches/soc2006-webui/Mailman/WebUI/wsgi_app.py    2006-10-23 19:32:38 UTC 
(rev 8080)
@@ -44,7 +44,7 @@
         
         # handle requests for 'static' data with paste's FileApp
         if pathparts[1] in ('static','templates'):
-            filename = join(config['VAR_PREFIX'],
+            filename = join(config.VAR_PREFIX,
                             'Mailman/WebUI',
                             path[1:])
             fa = FileApp(filename)


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

Reply via email to