diff MoinMoin/action/__init__.py @ 4183:fc20a076aad0

Accomodate for consolidation of Request/Response
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sat, 21 Jun 2008 16:57:20 +0200
parents 85884c67228d
children 40acd13fb3d6
line wrap: on
line diff
--- a/MoinMoin/action/__init__.py	Thu Jun 19 18:23:02 2008 +0200
+++ b/MoinMoin/action/__init__.py	Sat Jun 21 16:57:20 2008 +0200
@@ -245,7 +245,8 @@
     if not request.user.may.read(pagename):
         Page(request, pagename).send_page()
     else:
-        mimetype = request.form.get('mimetype', [u"text/html"])[0]
+        from MoinMoin.web.contexts import HTTPContext, RenderContext
+        mimetype = request.form.get('mimetype', u"text/html")
         rev = request.rev or 0
         if rev == 0:
             request.cacheable = cacheable
@@ -269,8 +270,8 @@
 def do_content(pagename, request):
     """ same as do_show, but we only show the content """
     # XXX temporary fix to make it work until Page.send_page gets refactored
-    request.response.mimetype = 'text/html'
-    request.response.status_code = 200
+    request.mimetype = 'text/html'
+    request.status_code = 200
     do_show(pagename, request, count_hit=0, content_only=1)
 
 def do_print(pagename, request):