Render html from source file (only copies right now).

This commit is contained in:
david 2002-11-19 15:21:31 +00:00
parent edd59dbc2d
commit 0ee5d0df1c
1 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,6 @@
#t = container.REQUEST
#RESPONSE = request.RESPONSE
from Products.CMFPlone import transaction_note
print context
REQUEST = container.REQUEST
body = ''
l = context.objectValues(['LampadasCVSFile']) # list the objects
@ -10,6 +9,14 @@ for i in (range(len(l))):
body += str(sourcefile.body)
context.setBody(body)
print 'Success.'
return printed
referer = REQUEST.HTTP_REFERER
referer = context.absolute_url()
view = context.getTypeInfo().getActionById('view')
note = 'Document html has been rendered.'
transaction_note(note)
return REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' % ( referer
, view
, note) )