[Zope] wiki manager
Pupeno
pupeno at pupeno.com
Sun Jul 25 01:48:28 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm creating a page where users, after logging in, can freely create wikis
based on ZWiki.
I have a lot of doubts, but I'll start with the beggining.
I come from PHP so, my method of working might be wrong and I want to check
with you.
I have a Template Page called 'my' that gives some status for the user (is
supoused to list the wikis that belong to the user and show administrative
tools), the main administrative tool is, create a wiki. And that's what I'm
working on. I have the following form there:
<form action="createWiki" method="get">
Name of the wiki: <input type="text" id="name" />
<input type="submit" label="Create!" />
</form>
and then, I have the script 'createWiki':
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE = request.RESPONSE
wikiName = request.get('name', 'wiki')
# Add the wiki
wikisFolder = context.restrictedTraverse('wikis')
wikisFolder.manage_addProduct['OFSP'].manage_addFolder(wikiName, wikiName)
newWikiFolder = wikisFolder.restrictedTraverse(wikiName)
newWikiFolder.manage_addProduct['ZWiki'].manage_addZWikiPage(wikiName,
wikiName)
why doesn't wikiName get's the input var ? and then... is this the right way
to do it ?
At the end, this script should redirect back to the my page or to the wiki...
is that ok ?
Thanks.
- --
Pupeno: pupeno at pupeno.com - http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBA0mzfW48a9PWGkURApgVAJ4+KIcgHkdIy13/Y1ld94VCbYCKLwCeLonw
IkGjMSAfyD6AlO/R95HwHp8=
=j4ud
-----END PGP SIGNATURE-----
More information about the Zope
mailing list