Logo Search packages:      
Sourcecode: zope-cmfforum version File versions  Download package

post_add.py

## Script (Python) "post_add"
##bind container=container
##bind context=context
##bind namespace=_
##bind script=script
##bind subpath=traverse_subpath
##parameters=author='', email='', text='', title='', submit='', file=''
##title=Add a new Post
##
new_id='msg_' + str(int( context.ZopeTime()))
context.addPost(id=new_id, title=title, email=email, author=author, text=text, file=file)
url = '%s/%s' % (context.absolute_url(), context.getTypeInfo().getActionById('view',''))
return context.REQUEST.RESPONSE.redirect(url)

Generated by  Doxygen 1.6.0   Back to index