Hi all, I want to provide a web based interface to editing stylesheets. I want these stylesheets to be contained within Zope. Is there something like Python's open() function that I can use? Thanks, Alec Munro
Hi, I ran into that kind of problem where I wanted my users to be able to edit files. A simple solution (could get dangerous if you dont set it up properly) is to have two external methods that read and write to a given file in the file system and then provide a textarea based interface for editing it and saving it. But please be warned, be "EXTREMELY" careful as to how you deal with which folder you give access to these methods to. The way I do it is preset the folder to and from which these methods read and write data and only pass the relative path as an argument. Also these folders in the file systems should have the appropriate access rights for zope to be able to read and write to. I am sure some other zopistas will be able to provide a neater solution, but this works for me and is quick and easy to implement. HTH AM Alec Munro wrote:
Hi all, I want to provide a web based interface to editing stylesheets. I want these stylesheets to be contained within Zope. Is there something like Python's open() function that I can use? Thanks,
Alec Munro
_______________________________________________ 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 )
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
On Wed, Nov 06, 2002 at 04:28:58PM -0400, Alec Munro wrote:
Hi all, I want to provide a web based interface to editing stylesheets. I want these stylesheets to be contained within Zope. Is there something like Python's open() function that I can use?
Hi Alec. Why does your name sound familiar to me? comp.lang.python maybe? You can either 1) use a dtml document or method for the stylesheet (they will happily contain any text content) or 2) put the stylesheet on the filesystem , and create an ExtFile that points to it, or a LocalFS that points to its directory. (ExtFile comes with zope, but LocalFS does not.) either way, you will be able to edit them through-the-web. -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"
Alec Munro writes:
I want to provide a web based interface to editing stylesheets. I want these stylesheets to be contained within Zope. Is there something like Python's open() function that I can use? Maybe, you should look at the Zope product "ZStyleSheet"?
Dieter
participants (4)
-
Alec Munro -
AM -
Dieter Maurer -
Paul Winkler