Re: [Zope] tal conditional help

2006-12-12 Thread Bernd Dorn


On 12.12.2006, at 22:57, David Bear wrote:


I have a page template that  tag to insert another template.
currently I do


  form template
 


use the or operator it also catches errors



  form template
 



___
Zope maillist  -  Zope@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 )


Re: [Zope] easier way with zpt

2006-09-19 Thread Bernd Dorn


On 20.09.2006, at 02:24, David Bear wrote:


I wanted to randomly pick a an image from an images folder and insert
it into my page. So I created a python script the return a random
selection from the images folder.

Then, in my zpt I did


  


Later in in the  tag I wanted to to do



however I found that slot1 was not giving me the full path to the
images folder. So I went back and did this:


  
  




tal:attributes="src slot1/absolute_url"





in order to get the object to have the full url.

It just seems there should be a better way. Anyone have a suggestion?

--
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 "Beware the IP portfolio, everyone will be suspect of trespassing"
___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: zope 2.8.6 on Mac Intel

2006-03-20 Thread Bernd Dorn


On 20.03.2006, at 20:46, manuel spuhler wrote:


on osx i would suggest using darwinports anyway


Tried with darwinports compiled form source (best on mac intel),  
and got the same error.


$ ./configure --with-python=/opt/local/bin/python2.3 && make
...
error: package directory 'build/lib/darwin-8/5/2-i386-2/4/zope/app/ 
traversing/ftests' does not exist

make: *** [build] Error 1


i don't know the reason, but for me the above path is wrong, on other  
archs, it is a single directory for the build


i think it should read: build/lib/darwin-8.5.2-i386-2.4/zope/app/ 
traversing/ftests


somehow the dots got replaced

maybe it is a zpkgsetup problem?

on my old powerbook it is:
lib.darwin-8.5.0-Power_Macintosh-2.4

btw: there is something wrong with the python version, you configured  
2.3 but the lib directory ends with 2/4(2.4)






Anybody can tell me where I could start to try to fix this?


___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: zope 2.8.6 on Mac Intel

2006-03-20 Thread Bernd Dorn


On 20.03.2006, at 09:37, Jens Vagelpohl wrote:



On 20 Mar 2006, at 07:42, Bernd Dorn wrote:

$ make
"/usr/local/bin/python2.3" "/Users/spuhlema/Desktop/Zope-2.8.6- 
final/setup.py" \

build
--build-base="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3"
--build-lib="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3/build-lib"
--build-scripts="/Users/spuhlema/Desktop/Zope-2.8.6-final/build- 
base/python-2.3/build-scripts"
--build-temp="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3/build-temp"

running build
running build_py
error: package directory
'build/lib/darwin-8/5/2-i386-2/4/zope/app/traversing/ftests' does  
not

exist
make: *** [build] Error 1

I guess Python doesn't compile equally on PowerPc and Intel.
Any idea?


you need zlib support compiled into python, this is only done, if  
the zlib header files are found at configure time


do you have it?


Umh, take a look at the error message. Do you see anything that  
looks like a zlib problem? I don't.


last time i installed a zope on debian and forgot to install the zlib  
headers and the error was also far away from complaining about zlib,  
so i thought it might be this


on osx i would suggest using darwinports anyway




jens

___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )


Re: [Zope] error with repozo.py

2006-03-19 Thread Bernd Dorn
On 20.03.2006, at 07:45, Martin Koekenberg wrote:  Hello, I get an error when I want to create a backup with repozo.py.  Traceback (most recent call last):  File "./repozo.py", line 74, in ?    from ZODB.FileStorage import FileStorageImportError: No module named ZODB.FileStorage I already searched with google for a solution. I found that it could be a problem with PYTHONPATH, but I’ve set this path already.are you sure, looks as if the path is not correctyou have to set it to /lib/pythonjust startup the python interpreter and typeimport sys; sys.paththen it should print the path defined above, if not something is wrong What else can be wrong ? Regards, Martin Koekenberg   ___Zope maillist  -  Zope@zope.orghttp://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 ) ___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: zope 2.8.6 on Mac Intel

2006-03-19 Thread Bernd Dorn


On 19.03.2006, at 20:30, manuel spuhler wrote:


Hello,

Thank you for your hints. I successfully compiled python2.3.5 for OS
10.4, as described in Florent Guillaume's blog, but when I try to
compile Zope, I get the same error:

$ ./configure --prefix=/opt/Zope2.8 --with-python=/usr/local/bin/ 
python2.3


Using Python interpreter at /usr/local/bin/python2.3

Configuring Zope installation

  - Zope top-level binary directory will be /opt/Zope2.8.
  - Makefile written.

  Next, run make.

$ make
"/usr/local/bin/python2.3" "/Users/spuhlema/Desktop/Zope-2.8.6- 
final/setup.py" \

build
--build-base="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3"
--build-lib="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3/build-lib"
--build-scripts="/Users/spuhlema/Desktop/Zope-2.8.6-final/build- 
base/python-2.3/build-scripts"
--build-temp="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/ 
python-2.3/build-temp"

running build
running build_py
error: package directory
'build/lib/darwin-8/5/2-i386-2/4/zope/app/traversing/ftests' does not
exist
make: *** [build] Error 1

I guess Python doesn't compile equally on PowerPc and Intel.
Any idea?


you need zlib support compiled into python, this is only done, if the  
zlib header files are found at configure time


do you have it?




2006/3/19, Jens Vagelpohl <[EMAIL PROTECTED]>:

$ make
"/usr/bin/python" "/Users/spuhlema/Desktop/Zope-2.8.6-final/
setup.py" \
build
--build-base="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/
python-2.3"
--build-lib="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/
python-2.3/build-lib"
--build-scripts="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-
base/python-2.3/build-scripts"
--build-temp="/Users/spuhlema/Desktop/Zope-2.8.6-final/build-base/
python-2.3/build-temp"


This line shows you are using the system Python at /usr/bin/python.
Don't. It's no good at all for compiling anything. Run "configure"
with the --with-python=/path/to/python flag to use a self-compiled
Python.

I have never used the Fink Python. It is child's play to compile
Python yourself (with the exception of Python 2.3.5 on OS X 10.4), so
that's the way to go. Here's the instructions I work from:

http://www.zope.org/Members/jens/docs/Document.2003-12-27.2431

These are not written for OS X/i386, but I'd be surprised if they
didn't work on both platforms.

jens

___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )


Re: [Zope] Zope 2.8.1 on Mac OS X tiger Server

2005-08-17 Thread Bernd Dorn


On 17.08.2005, at 20:22, Garito wrote:


Bernd Dorn escribió:



the following 3 problems

this line must be in /etc/hostconfig
ZOPESERVER=-YES-



On 17.08.2005, at 13:03, Garito wrote:



Hi all!

Yesterday I install Zope 2.8.1 on a Mac OS X tiger Server and  
all  goes ok


The only question I can't configure is the automatic boot up

I read some how-to's but they don't work

At /System/Library/StartupItems I create a folder called Zope  
with  2 files:


Zope with these contents:




the 'Zope'  file must be executable in order to work

chmod +x Zope





#!/bin/sh

##
# Zope Web Application Server
##

. /etc/rc.common

StartService ()
{
   if [ "${ZOPESERVER=-NO-}" = "-YES-" ]; then
   ConsoleMessage "Starting Zope"
   /var/zope/sistes/bin/zopectl start




typo? sistes == sites



   fi
}

StopService ()
{
   ConsoleMessage "Stopping Zope"
   /var/zope/sistes/bin/zopectl stop
}

RestartService ()
{
   if [ "${ZOPESERVER=-NO-}" = "-YES-" ]; then
   ConsoleMessage "Restarting Zope"
   /var/zope/sistes/bin/zopectl restart
   fi
}

RunService "$1"

and StartupParameters.plist with these content:


http://www.apple.com/DTDs/PropertyList-1.0.dtd";>


Description
Zope web application server
OrderPreference
None
Provides

Zope Server

Requires

Web Server




With these 2 files zope doesn't start at boot time. For that   
question I try another StartupParameters.plist:


{
 Description = "Zope WebServer";
 Provides= ("Zope WebServer");
 Requires= ("Web Server");
 OrderPreference = "None";
 Messages =
 {
   start = "Starting Zope WebServer Service";
   stop  = "Stopping Zope WebServer Service";
 };
}

but It doesn't work too

Can anyone help me?

Thanks a lot!

--
Mis Cosas
http://blogs.sistes.net/Garito/


___
Zope maillist  -  Zope@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 )




___
Zope maillist  -  Zope@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 )



Hi again!
Sorry but Zope is executable, perhaps another thing?
Any idea?

hm, have you set the effective user in zope.conf? you need this if  
you run zopectl as root


as root try to execute

/System/Library/StartupItems/Zope/Zope

from the commandline

and have a look what if something is looged into your event.log

without any messages i have no clue






Thanks

--
Mis Cosas
http://blogs.sistes.net/Garito/


___
Zope maillist  -  Zope@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 )



___
Zope maillist  -  Zope@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 )


Re: [Zope] Zope 2.8.1 on Mac OS X tiger Server

2005-08-17 Thread Bernd Dorn

the following 3 problems

this line must be in /etc/hostconfig
ZOPESERVER=-YES-



On 17.08.2005, at 13:03, Garito wrote:


Hi all!

Yesterday I install Zope 2.8.1 on a Mac OS X tiger Server and all  
goes ok


The only question I can't configure is the automatic boot up

I read some how-to's but they don't work

At /System/Library/StartupItems I create a folder called Zope with  
2 files:


Zope with these contents:


the 'Zope'  file must be executable in order to work

chmod +x Zope




#!/bin/sh

##
# Zope Web Application Server
##

. /etc/rc.common

StartService ()
{
   if [ "${ZOPESERVER=-NO-}" = "-YES-" ]; then
   ConsoleMessage "Starting Zope"
   /var/zope/sistes/bin/zopectl start


typo? sistes == sites


   fi
}

StopService ()
{
   ConsoleMessage "Stopping Zope"
   /var/zope/sistes/bin/zopectl stop
}

RestartService ()
{
   if [ "${ZOPESERVER=-NO-}" = "-YES-" ]; then
   ConsoleMessage "Restarting Zope"
   /var/zope/sistes/bin/zopectl restart
   fi
}

RunService "$1"

and StartupParameters.plist with these content:


http://www.apple.com/DTDs/PropertyList-1.0.dtd";>


Description
Zope web application server
OrderPreference
None
Provides

Zope Server

Requires

Web Server




With these 2 files zope doesn't start at boot time. For that  
question I try another StartupParameters.plist:


{
 Description = "Zope WebServer";
 Provides= ("Zope WebServer");
 Requires= ("Web Server");
 OrderPreference = "None";
 Messages =
 {
   start = "Starting Zope WebServer Service";
   stop  = "Stopping Zope WebServer Service";
 };
}

but It doesn't work too

Can anyone help me?

Thanks a lot!

--
Mis Cosas
http://blogs.sistes.net/Garito/


___
Zope maillist  -  Zope@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 )



___
Zope maillist  -  Zope@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 )


Re: [Zope] Zope 2.8.0 monkey patch issue

2005-06-13 Thread Bernd Dorn

Pascal Peregrina wrote:

Hi,

I am trying to migrate from Zope 2.7.6 to 2.8.0

In some product I did, I need to monkey patch some OFS and CMF classes (I do
this in product init).

I get this error whenever I try to do
.__dict__[]= :
TypeError: object does not support item assignment


'got the same problem

use:
setattr(,,)

must be something about the new implementation of extensionclass



This was working fine in Zope 2.7.x

Any idea what could have changed that would imply this ?

Thanks for your answers.

Pascal


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

___
Zope maillist  -  Zope@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 )


___
Zope maillist  -  Zope@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 )