changeset 4206:7c83580dba77

Added lazy theme property and missing output-method
author Florian Krupicka <florian.krupicka@googlemail.com>
date Wed, 09 Jul 2008 16:12:20 +0200
parents 55e87dd68a22
children 04b0ebc16dec
files MoinMoin/web/contexts.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/contexts.py	Wed Jul 09 16:11:11 2008 +0200
+++ b/MoinMoin/web/contexts.py	Wed Jul 09 16:12:20 2008 +0200
@@ -315,7 +315,10 @@
 
 class ThemeMixin(object):
     """ Mixin for the theme attributes and methods. """
-    theme = EnvironProxy('theme')
+    def _theme(self):
+        self.initTheme()
+        return self.theme
+    theme = EnvironProxy('theme', _theme)
 
     def initTheme(self):
         """ Set theme - forced theme, user theme or wiki default """
@@ -368,6 +371,9 @@
                             "consider changing this soon")
         self.request.stream.writelines(data)
 
+    def output(self):
+        return self.request()
+
 # TODO: extend xmlrpc context
 class XMLRPCContext(HTTPContext):
     """ Context to act during a XMLRPC request. """