Re: [Zope] Finding the right import folder

2012-03-16 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Write a browser view or use an external method.
It's well known that Python scripts are  restricted.

- -aj

Ron Chichester wrote:
> Andreas:
> 
> Thanks for the code snipped.  Unfortunately, I wasn't able to run
> that piece of code (as a Python script) because:
> 
> *Error Type: Unauthorized* *Error Value: You are not allowed to
> access 'config' in this context*
> 
> ... even though I ran it under a Manager account.
> 
> Any other ideas I could try?
> 
> Thanks much,
> 
> Ron
> 
> On Fri, Mar 16, 2012 at 12:29 AM, Andreas Jung  > wrote:
> 
> Isn't the client home slash import used for imports?
> 
> Something like
> 
> from App.config import getConfiguration import_dir =
> os.path.join(getConfiguration().clienthome), 'import')
> 
> (untested)?
> 
> -aj
> 
> Ron wrote:
>> I have a Zope instance running on a FreeBSD (8) server.  Zope is 
>> running fine (by all measures).  Here is the particulars of the 
>> system:
> 
>> Zope Version (Zope 2.7.9-final, python 2.4.5, freebsd8)
> 
>> Python Version 2.4.5 (#2, Nov 10 2011, 00:37:52) [GCC 4.2.1
>> 20070719 [FreeBSD]]
> 
>> System Platform freebsd8
> 
>> SOFTWARE_HOME /usr/local/www/Zope/lib/python
> 
>> ZOPE_HOME /usr/local/www/Zope
> 
>> INSTANCE_HOME /usr/local/setp
> 
>> CLIENT_HOME /usr/local/setp/var
> 
> 
>> Network Services  ZServer.HTTPServer.zhttp_server (Port: 8080) 
>> ZServer.FTPServer.FTPServer (Port: 8021)
> 
>> ---
> 
>> The problem is that I need to import some .zexp files.  I would
>> have thought that I should put them in the (already existing)
>> import folder at the INSTANCE_HOME (i.e., /usr/local/setp/import)
>> but when I restart Zope, none of the .zexp files (including the
>> standard Zope tutorial) show up in a pull-down menu in the import
>> page.  Based on the above, where should I put the .zexp files so
>> that the Zope instance finds them.
> 
>> ___ Zope maillist  - 
>> Zope@zope.org 
> https://mail.zope.org/mailman/listinfo/zope **   No
>> cross posts or HTML encoding!  ** (Related lists - 
>> https://mail.zope.org/mailman/listinfo/zope-announce 
>> https://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 
> 

- -- 
ZOPYX Limited   | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 Tübingen| Produce & Publish
www.zopyx.com   | www.produce-and-publish.com
- 
E-Publishing, Python, Zope & Plone development, Consulting


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJPZCwcAAoJEADcfz7u4AZjGjYLv3BTuY/2l3A8gnNR/cNIF9t+
jq/Wz8VD+F9yVwigIfnt63tUBLSR0RNDqm70j+IHadjhjTgnHQ0G8b6tap6sOHNc
/hD8kkSq/L/ByVPifNKXPU9Gbc7vCXKNUgZQVvUNw/sX+G3tW5lczvc9mptEIPmA
i5vqQ2jFb/YAbOsaZxM/xiVrFoflAs9vWsirYr3RGg+mXfT25HdesFSDwbHhjOEl
bHk+cYkiNrrgawpX2gu4li5B9ple1djuWi/rXaG663Qy2IAe2wltJOGd/CPmnAm+
+xyNYVstv844akdzpx44/dYOlfLcAivFo2Pt7T5AS+Yn5kfiXEU59fkhXzmxhfi7
DrFf0zzgfuQgXeUga41fU/VjWGYaaua4v29Bw+96ljUKuWzPyzq2IhGUB/oj6M+B
6OVdrAry1tZpqkAqHEsPjS9CixBSrhLqd/67WZp22aWU9DePObX/MqyNedIWWAfG
oidPG1GxauNLWhXPVUgykmZffT8xvvE=
=lsBp
-END PGP SIGNATURE-
<>___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Finding the right import folder

2012-03-16 Thread Richard Harley
You could also look at the quick importer product which would make 
things a little easier.

Rich

On 16/03/12 03:06, Ron wrote:

I have a Zope instance running on a FreeBSD (8) server.  Zope is running fine
(by all measures).  Here is the particulars of the system:

Zope Version
(Zope 2.7.9-final, python 2.4.5, freebsd8)

Python Version
2.4.5 (#2, Nov 10 2011, 00:37:52) [GCC 4.2.1 20070719 [FreeBSD]]

System Platform 
freebsd8

SOFTWARE_HOME
/usr/local/www/Zope/lib/python

ZOPE_HOME
/usr/local/www/Zope

INSTANCE_HOME
/usr/local/setp

CLIENT_HOME
/usr/local/setp/var


Network Services

ZServer.HTTPServer.zhttp_server (Port: 8080)
ZServer.FTPServer.FTPServer (Port: 8021)

---

The problem is that I need to import some .zexp files.  I would have thought
that I should put them in the (already existing) import folder at the
INSTANCE_HOME (i.e., /usr/local/setp/import) but when I restart Zope, none of
the .zexp files (including the standard Zope tutorial) show up in a pull-down
menu in the import page.  Based on the above, where should I put the .zexp files
so that the Zope instance finds them.

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


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


Re: [Zope] Finding the right import folder

2012-03-15 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Isn't the client home slash import used for imports?

Something like

from App.config import getConfiguration
import_dir = os.path.join(getConfiguration().clienthome), 'import')

(untested)?

- -aj

Ron wrote:
> I have a Zope instance running on a FreeBSD (8) server.  Zope is
> running fine (by all measures).  Here is the particulars of the
> system:
> 
> Zope Version (Zope 2.7.9-final, python 2.4.5, freebsd8)
> 
> Python Version 2.4.5 (#2, Nov 10 2011, 00:37:52) [GCC 4.2.1 20070719
> [FreeBSD]]
> 
> System Platform freebsd8
> 
> SOFTWARE_HOME /usr/local/www/Zope/lib/python
> 
> ZOPE_HOME /usr/local/www/Zope
> 
> INSTANCE_HOME /usr/local/setp
> 
> CLIENT_HOME /usr/local/setp/var
> 
> 
> Network Services  ZServer.HTTPServer.zhttp_server (Port: 8080) 
> ZServer.FTPServer.FTPServer (Port: 8021)
> 
> ---
> 
> The problem is that I need to import some .zexp files.  I would have
> thought that I should put them in the (already existing) import
> folder at the INSTANCE_HOME (i.e., /usr/local/setp/import) but when I
> restart Zope, none of the .zexp files (including the standard Zope
> tutorial) show up in a pull-down menu in the import page.  Based on
> the above, where should I put the .zexp files so that the Zope
> instance finds them.
> 
> ___ Zope maillist  -
> Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **   No
> cross posts or HTML encoding!  ** (Related lists - 
> https://mail.zope.org/mailman/listinfo/zope-announce 
> https://mail.zope.org/mailman/listinfo/zope-dev )

- -- 
ZOPYX Limited   | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 Tübingen| Produce & Publish
www.zopyx.com   | www.produce-and-publish.com
- 
E-Publishing, Python, Zope & Plone development, Consulting


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJPYs+9AAoJEADcfz7u4AZj5F0LwJ0Rus6bG2lQ5p2Dz3c1t9BJ
sQoMGdth7pJg7dYO9vbEdSRDr0wdsVGznYfUTlBIauNfrImW+YINp47W8Nc4DH69
BWBQfEfJ+rAOFhKEuCUFTAqNTX4ZzfcZI73XmbsQLaSKv7blgU+8A4r08Jag/epo
6vDuOKq+WjKZhkhhJplL3YsPXuEnTo0FInkWVXKXJkz7e5F/B6UgOublhY9fvZo5
PwwbqQalixmmm33he0qo9RCMaCaFY4PX2O0uo72r9DO/XuTagAx8ztxtqv/I7Pfa
yf9/Zv1O+qIucREaQXC4JjVr4xwNGYzq6+2kfRvi75KdU0zWtJqNP91TkiY+VNcf
M5ZTmXxw7L+a/9eBXwHy74Aco70bwhcv32T0jqsN/+Q6XeTHph281mpC8E1Yw8jw
YTUpWMUm9lhfhdl1EX5bBUKFXN3lEZyT+WwaleaWkV7XJ9rk+KvouJ0O+7FJukub
zMwO5q6VjBgQwBzphpfb+HJkU7ZlRZw=
=YJ4N
-END PGP SIGNATURE-
<>___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )