[Zope] pass zope form variables to a htaccess file

Laura McCord Laura.McCord at doucet-austin.com
Tue May 18 16:41:20 EDT 2004


Yeah, or maybe its possible to create another python script that creates
a new file using the directory path from the extfile and places a
.htaccess file in that directory and then writes to the .htaccess file. 

I created a username field in the form so I could pass the value to the
python script to be written in the .htaccess file.  Then, in the
extfile.py the directory path is define and I can possibly use this
value too. Then the rest of the content should be relatively static.

Maybe, when the form is submitted the python script can be called. 

What do you think?

-Laura

-----Original Message-----
From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On Behalf Of
Paul Winkler
Sent: Tuesday, May 18, 2004 3:31 PM
To: zope at zope.org
Subject: Re: [Zope] pass zope form variables to a htaccess file


On Tue, May 18, 2004 at 02:32:34PM -0500, Laura McCord wrote:
> I need to pass variables from the extfile form. I created a username 
> field and I need to pass that field value to a .htaccess file in the 
> /var/www/html/ path
> 
> Is that possible?


Maybe it is, if you treat the .htaccess as its own ExtFile.
 
> Also, maybe someone can point me to the right direction on this one. 
> When I create an ExtFile and the directory paths are created how can I

> automatically create a .htaccess in that directory?

I'd have your extfile creation form submit to a script that 
adds two ExtFiles, one for the "main" file and one for the .htaccess.

but then, you probably don't want the .htaccess to be visible in zope as
a normal ExtFile... I don't know what you can do about that.  Maybe
create a new Product that subclasses ExtFile and manages the .htaccess
files behind the scenes.

-- 

Paul Winkler
http://www.slinkp.com

_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )



More information about the Zope mailing list