mirror of https://github.com/tLDP/LDP
Render html from source file (only copies right now).
This commit is contained in:
parent
edd59dbc2d
commit
0ee5d0df1c
|
@ -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) )
|
||||
|
||||
|
|
Loading…
Reference in New Issue