[Zope] import folder at other place than root
Chris McDonough
chrism@digicool.com
Mon, 29 May 2000 18:55:05 -0400
Peter, you can change this in the Python file
lib/python/OFS/ObjectManager.py here:
def manage_importObject(self, file, REQUEST=None):
"""Import an object from a file"""
dirname, file=os.path.split(file)
if dirname:
raise 'Bad Request', 'Invalid file name %s' % file
file=os.path.join(INSTANCE_HOME, 'import', file)
if not os.path.exists(file):
raise 'Bad Request', 'File does not exist: %s' % file
change the line that says "file = os.path.join(INSTANCE_HOME, 'import',
file) to the location you'd like the file to be imported from. the
INSTANCE_HOME variable points at the root dir of the zope install.
Change it to something else... for more info, read the Python docs on
"os.path" at http://www.python.org/doc/current/lib/module-os.path.html
peter be wrote:
>
> Is it possible and how to change the folder that the Zope interface use for importing zexp files?
>
> I "host" friends on my Zope site, but I can't let them have access to my import folder which is in C:\Program\Zopesite\import
> At the moment my friends have to email me their zexp files, if they for example want to upload something they've been working on locally.
>
> Can I not edit the line where the Zope source code says that it expects zexp files from.
> Ex.
> From:
> importfolder = C:\Program\Zopesite\import
> To:
> importfolder = D:\otherdomain\or\host\folder
> Or:
> importfolder = "http://www.hostfriends.com/zopeimport"
>
> Ideas?
>
> _______________________________________________
> 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 )