[Zope] Adding Folders and index_html from Python Script
karthick ramanarayanan
ark@snapper.no
Sat, 24 Mar 2001 11:43:09 +0100 (CET)
Hi,
Check out the source for manage_addFolder and you will find that you
can specify 2 additional options or flags.
They are for creation of user folders and the index_html template file.
Just call the function with these 2 flags set and you get the acl_users
and the index_html template in your folder.
Cheers,
A.R.K
> Okay, I'm trying to create a site where the users can load information
about
> prospective clients and then add contact information about each client.
This
> is how it works now...
>
> I have a form that creates a folder with the name of the client as the
title of
> the folder. No sweat. I use...
>
> context.manage_addProduct['OFSP'].manage_addFolder(id=id,
title=clientName)
>
> .. which works fine to make the folder itself.
>
> However, there is nothing in the folder (i.e., no index_html file).
Thus, when
> the user moves to the folder, they get the index_html from the parent
folder.
>
> Is there a way to add a file to the newly created folder from a Python
script?
> The contents of the file can be very easy (such as "<dtml-var
> standard_html_header><dtml-var standard_html_footer>").
>
> As an asisde, I want to make the id of the folder a string that contains
only
> allowable characters that are taken from the name that the users input
(with an
> _ used in place of the blanks). Is there a quick easy way to do that
with some
> library function that isn't showing up in the Python Library Reference at
> www.python.org?
>
> Thanks in advance,
>
> Ron
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
--
Windows Sucks!!Linux Rules!!!.