[Zope] (no subject)

2006-08-03 Thread barrett-zope

I'm new to Zope, though I've been writing Python for some time.  I have a fresh 
installation to which I've added a simple Python script (code below) in the 
root directory.  When I test the script through the ZMI or attempt to access it 
via the web, I get an error:  

Error Type: Unauthorized
Error Value: You are not allowed to access localtime in this context

I'm logged in as a Manager and have tried setting the Proxy of the script to 
both Manager and Owner, to no avail.

Can someone please help me understand what is happening and how to fix it?

Thanks

code of the script:

import time
t=time.localtime()
print t
return printed



___
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] How can i improve performance of website under heavy load in Zope2.6.1

2006-08-03 Thread Stefan H. Holek

On 31. Jul 2006, at 09:13, Sudesh Soni wrote:

I wonder why Zope is default set for handling 4 threads and 7  
database connections.


These are good values under normal circumstances.



I tried inreasing threads to 20 and database connections to 30 by  
updating z2.py and DB.py, presuming that this will help to improve  
performance under heavy load.


Can anyone suggest what impact will be there if i do this , in Zope  
2.6.1




Zope is not Apache. Increasing the number of threads is unlikely to  
help performance unless, perhaps, when you have a heavily loaded  
RDBMS backing your Zope and see threads hanging waiting for the  
RDBMS to respond.



OR

Can anyone suggest any other option to improve performance under  
heavy load in Zope 2.6.1


Figure out why your Zope is slow. Is it CPU bound or I/O bound? Use a  
profiler to analyze your code (PTProfiler, ZopeProfiler). Set up ZEO  
+ multiple ZEO clients, if need be on multiple boxes. And put a cache  
in front, Squid works well.


Stefan

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] (no subject)

2006-08-03 Thread Marco Bizzarri

Please take a look at the Zope book, in the section about security
where it speaks about trusted and untrusted code.

Basically, you can access from a Python script (i.e. untrused code)
only those modules which are explicity declared so in Zope.

time module is most probably not in those modules.

Regards
Marco

On 3 Aug 2006 10:36:12 -, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:


I'm new to Zope, though I've been writing Python for some time.  I have a fresh 
installation to which I've added a simple Python script (code below) in the 
root directory.  When I test the script through the ZMI or attempt to access it 
via the web, I get an error:

Error Type: Unauthorized
Error Value: You are not allowed to access localtime in this context

I'm logged in as a Manager and have tried setting the Proxy of the script to 
both Manager and Owner, to no avail.

Can someone please help me understand what is happening and how to fix it?

Thanks

code of the script:

import time
t=time.localtime()
print t
return printed



___
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 )




--
Marco Bizzarri
http://notenotturne.blogspot.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] Programatically logging out of Zope

2006-08-03 Thread Sinang, Danny



Hello,

Would anyone here 
know how to programmatically log out of Zope ?

Regards,
Danny


___
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] Programatically logging out of Zope

2006-08-03 Thread Jean Jordaan
 Would anyone here know how to programmatically log out of Zope ?

Redirect the user to a page that always raises Unauthenticated. See
manage_zmi_logout.

-- 
jean
___
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] Programatically logging out of Zope

2006-08-03 Thread Stefan H. Holek

from AccessControl.SecurityManagement import noSecurityManager
noSecurityManager()

Stefan


On 3. Aug 2006, at 13:58, Sinang, Danny wrote:


Hello,

Would anyone here know how to programmatically log out of Zope ?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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: Re: [Zope] defunct process with os.spawn*

2006-08-03 Thread Alan

Guys, I must say that I really appreciate your attention, that's
pretty cool to have such a nice people to give support to newbies like
me.

Based on what got here I found a solution that worked for me:

pid_test,st=os.waitpid(jpid,os.WNOHANG)

Now, let's go for the next trouble...

Cheers,
Alan

On 02/08/06, Chris McDonough [EMAIL PROTECTED] wrote:

You need to call os.waitpid() at some point to clean up finished
processes.

- C

On Aug 2, 2006, at 1:59 PM, Jonathan wrote:


 - Original Message - From: Alan [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Wednesday, August 02, 2006 1:52 PM
 Subject: [Zope] defunct process with os.spawn*


 Dears,

 Now I am facing an annoying problem.

 I have an application in Zope which calls a External Method, which
 calls a bash script via:

 var_pid = os.spawnlp(os.P_NOWAIT, 'script.sh', 'script.sh',
 arg1,arg2)

 The idea is to start some programs in background (which will take
 hours running) and I need to pass arguments and track its PID for
 eventually checking its status. So os.spawnlp seemed the perfect
 solution.

 However, when my bash script finished, my processes gets defunct
 childed to the Zope process. And only restarting Zope to get rid of
 such defunct process, an unthinkable solution.

 It sounds like you are generating zombie processes (child processes
 which have completed, but are not handled by the processes that
 spawned them). Try googling:  python reap spawned process


 Jonathan


 ___
 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 )






--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
hi,
- Original Message - 
From: Jens Vagelpohl [EMAIL PROTECTED]
To: [Zope] Mailing List zope@zope.org
Sent: Wednesday, August 02, 2006 12:52 PM
Subject: Re: [Zope] adding product-based objects programmatically


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 On 2 Aug 2006, at 06:37, Kees de Brabander wrote:

  Hi,
  Apparently my knowledge of Zope/Python is still to limited.
  I have a product that derives from Folder. When I add this product
  to a
  folder via zmi I want to have it populated with other products to it
  programmatically. I tried to do so in the __init__ function. That
  works with
  objects like acl_user folders, but not with products in the products
  directory. Can anyone send me in the right direction or at least
  give a hint
  where to look for a solution?

 Do not do this in __init__ as you have no acquisition at that point.
 Use manage_afterAdd for that.

 jens

Your remark appeared (and presumably is) valid, although I do not understand
why adding acl_user folders has no problems with that. So, I additionally
defined manage_afterAdd. However I got the same error. Any more pointers? By
the way, where are 'manage_afterAdd' and friends documented?
tia, cb

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()

def manage_afterAdd(self, item, container):
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)
if REQUEST is not None:
dispatcher.manage_main(dispatcher, REQUEST)


Traceback (innermost last):

  a.. Module ZPublisher.Publish, line 101, in publish
  b.. Module ZPublisher.mapply, line 88, in mapply
  c.. Module ZPublisher.Publish, line 39, in call_object
  d.. Module Products.QuerySet.QuerySet, line 81, in manage_addQuerySet
  e.. Module OFS.ObjectManager, line 276, in _setObject
  f.. Module Products.QuerySet.QuerySet, line 114, in manage_afterAdd
  g.. Module Products.Query.Query, line 80, in manage_addQuery
AttributeError: Destination



zope 2.7.8, win32



___
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] adding product-based objects programmatically

2006-08-03 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Your remark appeared (and presumably is) valid, although I do not  
understand
why adding acl_user folders has no problems with that. So, I  
additionally
defined manage_afterAdd. However I got the same error. Any more  
pointers? By

the way, where are 'manage_afterAdd' and friends documented?


Google? The source code? Dunno.


  a.. Module ZPublisher.Publish, line 101, in publish
  b.. Module ZPublisher.mapply, line 88, in mapply
  c.. Module ZPublisher.Publish, line 39, in call_object
  d.. Module Products.QuerySet.QuerySet, line 81, in  
manage_addQuerySet

  e.. Module OFS.ObjectManager, line 276, in _setObject
  f.. Module Products.QuerySet.QuerySet, line 114, in manage_afterAdd
  g.. Module Products.Query.Query, line 80, in manage_addQuery
AttributeError: Destination


This error is obviously coming from your own source code, and since I  
don't see that code I can't help.


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE0fSzRAx5nvEhZLIRAoYGAJ9Ic5o/B0SQoe0k459Lre37f0qwVQCdGXhV
R9oDTi32WNJNhrIYUidfBSI=
=diJA
-END PGP SIGNATURE-
___
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] new user, teething problems

2006-08-03 Thread John P. Looney
Hey, after four years, I've finally found the time to go back  look at Zope again.Unfortunately, after installing the RPM (zope-2.7.2-0.1.2.el4.rf, I ran:[EMAIL PROTECTED] tmp]# zopectl adduser the_power password
Traceback (most recent call last): File string, line 1, in ? File /usr/lib/zope/lib/python/Zope/__init__.py, line 51, in app startup() File /usr/lib/zope/lib/python/Zope/__init__.py, line 47, in startup
 _startup() File /usr/lib/zope/lib/python/Zope/App/startup.py, line 57, in startup DB = configuration.dbtab.getDatabase('/', is_root=1) File /usr/lib/zope/lib/python/DBTab/DBTab.py, line 96, in getDatabase
 db = self._createDatabase(name, is_root) File /usr/lib/zope/lib/python/DBTab/DBTab.py, line 113, in _createDatabase db = factory.open() File /usr/lib/zope/lib/python/Zope/Startup/datatypes.py, line 172, in open
 DB = self.createDB() File /usr/lib/zope/lib/python/Zope/Startup/datatypes.py, line 169, in createDB return ZODBDatabase.open(self) File /usr/lib/zope/lib/python/ZODB/config.py, line 97, in open
 return ZODB.DB(section.storage.open(), File /usr/lib/zope/lib/python/ZODB/config.py, line 128, in open quota=self.config.quota) File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 232, in __init__
 self._lock_file = LockFile(file_name + '.lock') File /usr/lib/zope/lib/python/ZODB/lock_file.py, line 64, in __init__ lock_file(self._fp) File /usr/lib/zope/lib/python/ZODB/lock_file.py, line 44, in lock_file
 fcntl.flock(file.fileno(), _flags)IOError: [Errno 11] Resource temporarily unavailableAnyone know what's going on ? Is it trying to read a file called 'string' ?john
___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
Huh? I included the relevant portions of my source code in my message:

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()

def manage_afterAdd(self, item, container):
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)
if REQUEST is not None:
dispatcher.manage_main(dispatcher, REQUEST)

cb
- Original Message - 
From: Jens Vagelpohl [EMAIL PROTECTED]
To: [Zope] Mailing List zope@zope.org
Sent: Thursday, August 03, 2006 3:05 PM
Subject: Re: [Zope] adding product-based objects programmatically


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
  Your remark appeared (and presumably is) valid, although I do not  
  understand
  why adding acl_user folders has no problems with that. So, I  
  additionally
  defined manage_afterAdd. However I got the same error. Any more  
  pointers? By
  the way, where are 'manage_afterAdd' and friends documented?
 
 Google? The source code? Dunno.
 
a.. Module ZPublisher.Publish, line 101, in publish
b.. Module ZPublisher.mapply, line 88, in mapply
c.. Module ZPublisher.Publish, line 39, in call_object
d.. Module Products.QuerySet.QuerySet, line 81, in  
  manage_addQuerySet
e.. Module OFS.ObjectManager, line 276, in _setObject
f.. Module Products.QuerySet.QuerySet, line 114, in manage_afterAdd
g.. Module Products.Query.Query, line 80, in manage_addQuery
  AttributeError: Destination
 
 This error is obviously coming from your own source code, and since I  
 don't see that code I can't help.
 
 jens
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.1 (Darwin)
 
 iD8DBQFE0fSzRAx5nvEhZLIRAoYGAJ9Ic5o/B0SQoe0k459Lre37f0qwVQCdGXhV
 R9oDTi32WNJNhrIYUidfBSI=
 =diJA
 -END PGP SIGNATURE-
 ___
 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] new user, teething problems

2006-08-03 Thread Jean Jordaan
Hi John

   File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 232, in
 __init__
 self._lock_file = LockFile(file_name + '.lock')
[...]
 IOError: [Errno 11] Resource temporarily unavailable
 
  Anyone know what's going on ? Is it trying to read a file called
 'string' ?

No, it's failing to write a lockfile. Check the filesystem permissions in
your zope instance. Zope doesn't run as root, but as the user configured
in etc/zope.conf, if you start it up as root .. that user needs write
permission.

-- 
jean
___
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] new user, teething problems

2006-08-03 Thread Chris McDonough
It's also possible that the error message is signifying that Zope is  
already started and you're trying to start it again.


- C

On Aug 3, 2006, at 10:32 AM, Jean Jordaan wrote:


Hi John


  File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 232, in
__init__
self._lock_file = LockFile(file_name + '.lock')

[...]

IOError: [Errno 11] Resource temporarily unavailable

 Anyone know what's going on ? Is it trying to read a file called
'string' ?


No, it's failing to write a lockfile. Check the filesystem  
permissions in
your zope instance. Zope doesn't run as root, but as the user  
configured

in etc/zope.conf, if you start it up as root .. that user needs write
permission.

--
jean
___
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] new user, teething problems

2006-08-03 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 3 Aug 2006, at 10:25, John P. Looney wrote:



 Hey, after four years, I've finally found the time to go back   
look at Zope again.


 Unfortunately, after installing the RPM (zope-2.7.2-0.1.2.el4.rf,  
I ran:


For your own sanity, ditch that unsupported and really really ancient  
third-party RPM and install a current version from source.


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE0gu3RAx5nvEhZLIRAvheAJ4xoVjMXTs8hTsoqnmB9bql/A4lEACcCjIO
8+fC/1HPegjIAJUW/AIdqsY=
=Ecdv
-END PGP SIGNATURE-
___
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] new user, teething problems

2006-08-03 Thread John P. Looney
Oh. There aren't any more recent RPMS then ? I really really hate installing stuff from source anymore, esp. when other admins on the same system have a tendancy to upgrade packages like python and everything else without checking does everything still run
For the record; it was both that zope didn't have write access to the data directory and that zope was already running.JohnOn 8/3/06, Jens Vagelpohl
 [EMAIL PROTECTED] wrote:-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1On 3 Aug 2006, at 10:25, John P. Looney wrote:Hey, after four years, I've finally found the time to go back  look at Zope again.Unfortunately, after installing the RPM (
zope-2.7.2-0.1.2.el4.rf, I ran:For your own sanity, ditch that unsupported and really really ancientthird-party RPM and install a current version from source.jens-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)iD8DBQFE0gu3RAx5nvEhZLIRAvheAJ4xoVjMXTs8hTsoqnmB9bql/A4lEACcCjIO8+fC/1HPegjIAJUW/AIdqsY==Ecdv-END PGP SIGNATURE-___
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] new user, teething problems

2006-08-03 Thread Jens Vagelpohl


On 3 Aug 2006, at 10:46, John P. Looney wrote:



 Oh. There aren't any more recent RPMS then ? I really really hate  
installing stuff from source anymore, esp. when other admins on the  
same system have a tendancy to upgrade packages like python and  
everything else without checking does everything still run


There are no supported RPMs. Those that are out there have been  
created by third parties and are really old and not supported.


If you're running in a production environment and want to ensure your  
Zope setup is not affected by system updates it is recommended to  
install both Python and Zope from recent sources.


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 )


Re: [Zope] new user, teething problems

2006-08-03 Thread John P. Looney
On 8/3/06, Jens Vagelpohl [EMAIL PROTECTED] wrote:
There are no supported RPMs. Those that are out there have beencreated by third parties and are really old and not supported.If you're running in a production environment and want to ensure yourZope setup is not affected by system updates it is recommended to
install both Python and Zope from recent sources.Huh. How very 1980s.OK, I'll give that a go. Thanks.John
___
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] new user, teething problems

2006-08-03 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 3 Aug 2006, at 11:33, John P. Looney wrote:


On 8/3/06, Jens Vagelpohl [EMAIL PROTECTED] wrote:
There are no supported RPMs. Those that are out there have been
created by third parties and are really old and not supported.

If you're running in a production environment and want to ensure your
Zope setup is not affected by system updates it is recommended to
install both Python and Zope from recent sources.

 Huh. How very 1980s.


This has nothing to do with 1980s, just with sanity. Or do you  
think it's OK to use some distribution-installed Python where you  
have no idea how it has been built and which maybe upgraded without  
your knowledge and cause breakage in your Zope setup?


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE0hs9RAx5nvEhZLIRAslkAJ99f3paD6s35XLAa7qWeGyhCpgm5ACgr1lM
9mbbUkS2MeyUE6gzd/7RoMo=
=x735
-END PGP SIGNATURE-
___
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] Re: new user, teething problems

2006-08-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John P. Looney wrote:

 On 8/3/06, Jens Vagelpohl [EMAIL PROTECTED]
 wrote:

 There are no supported RPMs. Those that are out there have been
 created by third parties and are really old and not supported.

 If you're running in a production environment and want to ensure your
 Zope setup is not affected by system updates it is recommended to
 install both Python and Zope from recent sources.
 
 
 Huh. How very 1980s.

The problem is that the distribution-supplied Python has been configured
for a different set of tradeoffs (driving GUI sysadmin applets, mostly,
across multiple languages / character sets) than those appropriate for
powering long-running appserver.  In this, if nothing else, Zope
resembles a Java appserver:  they are typically supported only when
running a *specific* version of a *specific* JVM, which is highly
unlikely to be the JVM / version shipped by a given distro.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE0iBV+gerLs4ltQ4RAoWoAJ9Uk1ztzlykPER+hkHpW0g3GrJC8QCgwNnK
6cpysyG6X1gSeQXK231BBu8=
=tr8T
-END PGP SIGNATURE-

___
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] new user, teething problems

2006-08-03 Thread John P. Looney
On 8/3/06, Jens Vagelpohl [EMAIL PROTECTED] wrote:
This has nothing to do with 1980s, just with sanity. Or do youthink it's OK to use some distribution-installed Python where youhave no idea how it has been built and which maybe upgraded withoutyour knowledge and cause breakage in your Zope setup?
Yeah. It's worked great for me. In fact, it was one of the big reasons I moved away from slackware to distributions like redhat  debian. Python is nice, in that it lives happily with older versions, so I should be able to upgrade the 
2.3 rpm to 2.4, and let Zope use that.John
___
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] new user, teething problems

2006-08-03 Thread Lennart Regebro

The Python distros are generally quite OK and stable now, and useful
even for production systems, even though I fully understand that
people prefer to compile their own, if for no other reason to have one
specific for Zope, so that no package version suddenly gets upgraded
to something incompatible.

But the Zope RPMs have bever been particularily stable, supported or
released in a timely manner.

Use Python RPMs if you want. I do. But don't use the Zope RPMs. It's
more trouble than using the source version.

Sure, it would be nice if it wasn't so, but that's how it is. :)
___
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] Get uploaded file size

2006-08-03 Thread Dieter Maurer
AnThu Nguyen wrote at 2006-8-2 10:13 -0700:
 ...
I'm trying to get the size of a file uploaded via an HTML form before 
it's written. context.REQUEST.file only accesses the file name, not 
the content. How do I read the contents? Any help will be much appreciated.

If context.REQUEST.file is the file name and not a
ZPublisher.HTTPRequest.FileUpload object, then you
are doing something wrong. Either you use an HTTP GET request
or you do not use multipart/formdata as mime type.

A FileUpload object behaves like a file and you can
use the usual way to determine its size.


-- 
Dieter
___
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] adding product-based objects programmatically

2006-08-03 Thread Dieter Maurer
Kees de Brabander wrote at 2006-8-3 16:25 +0200:
Huh? I included the relevant portions of my source code in my message:

Module QuerySet.py:
from Query import manage_addQuery
class QuerySet(Folder):
def __init__(self, id, title):
self.id = id
self.title = title
self.manage_addUserFolder()

def manage_afterAdd(self, item, container):
manage_addQuery(self, id, title)

manage_addQuery in Query.py looks like:
def manage_addQuery(dispatcher, id, title, REQUEST=None):

nQ=Query(id,title)
dispatcher.Destination()._setObject(id, nQ)

Apparently, dispatcher lacks a Destination method.

Why are you using it?
Usually dispatcher._setObject is enough.



-- 
Dieter
___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander

- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]
To: Kees de Brabander [EMAIL PROTECTED]
Cc: Jens Vagelpohl [EMAIL PROTECTED]; [Zope] Mailing List
zope@zope.org
Sent: Thursday, August 03, 2006 7:04 PM
Subject: Re: [Zope] adding product-based objects programmatically


 Kees de Brabander wrote at 2006-8-3 16:25 +0200:
 Huh? I included the relevant portions of my source code in my message:
 
 Module QuerySet.py:
 from Query import manage_addQuery
 class QuerySet(Folder):
 def __init__(self, id, title):
 self.id = id
 self.title = title
 self.manage_addUserFolder()
 
 def manage_afterAdd(self, item, container):
 manage_addQuery(self, id, title)
 
 manage_addQuery in Query.py looks like:
 def manage_addQuery(dispatcher, id, title, REQUEST=None):
 
 nQ=Query(id,title)
 dispatcher.Destination()._setObject(id, nQ)

 Apparently, dispatcher lacks a Destination method.

 Why are you using it?
 Usually dispatcher._setObject is enough.

I must confess that I copied it from an example (don't know which anymore).
Thanks anyway, problem solved, even when done in the __init__ of Queryset.
Would manage_afterAdd a more sensible place for it?

cb

___
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] adding product-based objects programmatically

2006-08-03 Thread Kees de Brabander
 manage_addQuery in Query.py looks like:
 def manage_addQuery(dispatcher, id, title, REQUEST=None):
 
 nQ=Query(id,title)
 dispatcher.Destination()._setObject(id, nQ)

 Apparently, dispatcher lacks a Destination method.

 Why are you using it?
 Usually dispatcher._setObject is enough.

I remembered and checked: it was taken from the Zope Developer's Guide 2.4
edition on zope.org!!

___
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] Filling Out a PDF

2006-08-03 Thread Muk Yan
Dear Knowledgeable Zope Zealots,Thanks for pointing me in the right direction last time, I just didn't know that I should have searched for zsql instead of sql.I've racked my brain and searched the great vastness to no avail. I have some PDF forms that I've converted to HTML in order for people to fill them out and then print them.
I was wondering was there any way to edit the PDF directly or convert the PDF to another format and enter in the information that the user has entered? Of course any help would be appreciated. I've already converted the forms to PDF, but it of course doesn't look *exactly* like the PDF which is what I would prefer. Do you think maybe remaking the PDF's into ZPDF would be a good path to follow?
Maybe convert it to an FDF and somehow get the infor from the webform into it and then spit back out a completed PDF?Thanks again and take care all,Muk
___
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] WHM/LibProxy Problem

2006-08-03 Thread beno
I have FreeBSD 5.3 and just installed Apache 2.2.3. I just took over 
sysadmining this box. We work with Zope and VirtualHostMonster, so 
there's lots of RewriteRules and a proxy is necessary. The problem is 
configuring the proxy. The old Apache (1.3.3) had the following:


LoadModule proxy_module   libexec/libproxy.so

ClearModuleList
AddModule proxy_module libexec/libproxy.so


but apparently the new version of Apache doesn't use that code any more. 
I ran my configure command with

--enable-proxy=shared
among others and it didn't complain. Nonetheless, I get errors like this:

server167# /usr/local/apache2/bin/apachectl -k start
httpd: Syntax error on line 56 of /usr/local/apache2/conf/httpd.conf: 
Cannot load /usr/local/apache2/modules/libproxy.so into server: 
/usr/local/apache2/modules/libproxy.so: Undefined symbol ap_dummy_mutex


when I copy libproxy.so over to the new distro and put in the LoadModule 
command,


server167# /usr/local/apache2/bin/apachectl -k start
Syntax error on line 576 of /usr/local/apache2/conf/vhosts.conf: // This 
is where my VirtualHost * stuff lives
Invalid command 'CacheRoot', perhaps misspelled or defined by a module 
not included in the server configuration


server167# /usr/local/apache2/bin/apachectl -k start
httpd: Syntax error on line 56 of /usr/local/apache2/conf/httpd.conf: 
Cannot load /usr/local/apache2/modules/libproxy.so into server: 
/usr/local/apache2/modules/libproxy.so: Undefined symbol ap_dummy_mutex


For some reason, I can't get the old Apache up, either, so I'm trying to 
resolve the problem with the new one. Please help. Thanks.

beno
___
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] maximum recursion depth exceeded - SimpleUserFolder

2006-08-03 Thread Remy Pinsonnault
Hello 

I have a SimpleUserFolder 0.9.0inside a GRUF folder.

I am running ona Plone 2.1.3 instance.

If I change the SimpleUserFolder to the newest version (1.1.2), I get a maximum recursion depth exceeded error (see traceback).

What is wrong??

Site Error
An error was encountered while publishing this resource. 
RuntimeErrorSorry, a site error occurred. 

Traceback (innermost last): 

Module ZPublisher.Publish, line 188, in publish_module_standard 
Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish 
Module ZPublisher.Publish, line 145, in publish 
Module Zope2.App.startup, line 216, in zpublisher_exception_hook 
Module ZPublisher.Publish, line 114, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 40, in call_object 
Module Products.GroupUserFolder.GroupUserFolder, line 2092, in manage_workspace 
Module Shared.DC.Scripts.Bindings, line 311, in __call__ 
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec 
Module Products.PageTemplates.PageTemplateFile, line 110, in _exec 
Module Products.PageTemplates.PageTemplate, line 104, in pt_renderPageTemplateFile at /PloneExtranet/acl_users/manage_overview 
Module TAL.TALInterpreter, line 206, in __call__ 
Module TAL.TALInterpreter, line 250, in interpret 
Module TAL.TALInterpreter, line 481, in do_setGlobal_tal 
Module Products.PageTemplates.TALES, line 221, in evaluateURL: manage_overviewLine 85, Column 2_expression_: PythonExpr test(request.has_key('start'), 0, here.listUsersBatchTable())
Names:{'container': GroupUserFolder at /PloneExtranet/acl_users,
 'context': GroupUserFolder at /PloneExtranet/acl_users,
 'default': Products.PageTemplates.TALES.Default instance at 0x0118B9E0,
 'here': GroupUserFolder at /PloneExtranet/acl_users,
 'loop': Products.PageTemplates.TALES.SafeMapping object at 0x0433F378,
 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x01176EB8,
 'nothing': None,
 'options': {'args': ()},
 'repeat': Products.PageTemplates.TALES.SafeMapping object at 0x0433F378,
 'request': HTTPRequest, URL="" href="http://127.0.0.1:8080/PloneExtranet/acl_users/manage_workspace">http://127.0.0.1:8080/PloneExtranet/acl_users/manage_workspace,
 'root': Application at ,
 'template': PageTemplateFile at /PloneExtranet/acl_users/manage_overview,
 'traverse_subpath': [],
 'user': admin}
Module Products.PageTemplates.ZRPythonExpr, line 47, in __calltraceback_info__: test(request.has_key('start'), 0, here.listUsersBatchTable()) 
Module Python _expression_ test(request.has_key('start'), 0, here.listUsersBatchTable()), line 1, in _expression_ 
Module Products.GroupUserFolder.GroupUserFolder, line 2189, in listUsersBatchTable 
Module Products.GroupUserFolder.GroupUserFolder, line 2156, in listUsersBatches 
Module Products.GroupUserFolder.GroupUserFolder, line 391, in getPureUsers 
Module Products.GroupUserFolder.GroupUserFolder, line 283, in getUsers 
Module Products.SimpleUserFolder.SimpleUserFolder, line 102, in getUsers 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 
Module Products.GroupUserFolder.GroupUserFolder, line 216, in getUserNames 
Module Products.SimpleUserFolder.SimpleUserFolder, line 63, in getUserNames 
Module Products.GroupUserFolder.GroupUserFolder, line 245, in getUserIds 

Re: [Zope] Filling Out a PDF

2006-08-03 Thread Chris McDonough

Hi,

This product:

http://www.reportlab.com/pagecatcher_index.html

seems like what you want... it's written in Python.

- C

On Aug 3, 2006, at 3:52 PM, Muk Yan wrote:


Dear Knowledgeable Zope Zealots,

Thanks for pointing me in the right direction last time, I just  
didn't know that I should have searched for zsql instead of sql.


I've racked my brain and searched the great vastness to no avail.   
I have some PDF forms that I've converted to HTML in order for  
people to fill them out and then print them.


I was wondering was there any way to edit the PDF directly or  
convert the PDF to another format and enter in the information that  
the user has entered?  Of course any help would be appreciated.   
I've already converted the forms to PDF, but it of course doesn't  
look *exactly* like the PDF which is what I would prefer.  Do you  
think maybe remaking the PDF's into ZPDF would be a good path to  
follow?


Maybe convert it to an FDF and somehow get the infor from the  
webform into it and then spit back out a completed PDF?


Thanks again and take care all,
Muk
___
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] new user, teething problems

2006-08-03 Thread John P. Looney
Hey, I've made my first page, though it's not working as I'd like. This is the contents of the page:htmltitle testing/titleGoing ! basdasda /b brdtml-var date fmt=Datebr
/htmlBut, the error logs show that it's not happy...Traceback (most recent call last): File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, line 138, in publish
 result = publication.callObject(request, object) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/publication/zopepublication.py, line 161, in callObject return mapply(ob, request.getPositionalArguments
(), request) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, line 113, in mapply return debug_call(object, args) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, line 119, in debug_call
 return object(*args) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/dtmlpage/browser.py, line 26, in index return template.render(REQUEST, **kw) File /tmp/Zope-3.2.1/build/lib.linux-
i686-2.4/zope/app/dtmlpage/dtmlpage.py, line 49, in render return self.template(self.__parent__, request, REQUEST=request, **kw) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/untrusted/untrusted.py, line 66, in __call__
 ProxyFactory(mapping), File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_string.py, line 484, in __call__ result = render_blocks(self._v_blocks, md) File /tmp/Zope-
3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/pdocumenttemplate.py, line 322, in render_blocks section = section(md) File /tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_var.py, line 207, in render
 raise KeyError(name)KeyError: u'date'Any idea what I could be doing wrong ? No dtml tag I use seems to work - all throw an error.John
___
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] new user, teething problems

2006-08-03 Thread David H

John P. Looney wrote:



 Hey, I've made my first page, though it's not working as I'd like. 
This is the contents of the page:


html
title testing/title
 Going ! basdasda /b br
dtml-var date fmt=Datebr
/html

 But, the error logs show that it's not happy...

 Traceback (most recent call last):
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, 
line 138, in publish

result = publication.callObject(request, object)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/publication/zopepublication.py, 
line 161, in callObject

return mapply(ob, request.getPositionalArguments (), request)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, 
line 113, in mapply

return debug_call(object, args)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py, 
line 119, in debug_call

return object(*args)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/dtmlpage/browser.py, 
line 26, in index

return template.render(REQUEST, **kw)
  File /tmp/Zope-3.2.1/build/lib.linux- 
i686-2.4/zope/app/dtmlpage/dtmlpage.py, line 49, in render

return self.template(self.__parent__, request, REQUEST=request, **kw)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/untrusted/untrusted.py, 
line 66, in __call__

ProxyFactory(mapping),
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_string.py, 
line 484, in __call__

result = render_blocks(self._v_blocks, md)
  File /tmp/Zope- 
3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/pdocumenttemplate.py, 
line 322, in render_blocks

section = section(md)
  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_var.py, 
line 207, in render

raise KeyError(name)
KeyError: u'date'

 Any idea what I could be doing wrong ? No dtml tag I use seems to 
work - all throw an error.


John


Where is date defined? 
If the answer is nowhere you really need to read the zope book. If its 
somewhere then include that code as well (pertinent parts).

Best luck,
David

___
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] adding product-based objects programmatically

2006-08-03 Thread Gabriel Genellina

At Thursday 3/8/2006 15:51, Kees de Brabander wrote:


 dispatcher.Destination()._setObject(id, nQ)

I remembered and checked: it was taken from the Zope Developer's Guide 2.4
edition on zope.org!!


I would delete that from zope.org site.
It's far too old and outdated, and confuses people.



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


___
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] new user, teething problems

2006-08-03 Thread Gabriel Genellina

At Thursday 3/8/2006 20:14, John P. Looney wrote:

 Hey, I've made my first page, though it's not working as I'd like. 
This is the contents of the page:


html
title testing/title
 Going ! basdasda /b br
dtml-var date fmt=Datebr
/html


Page Templates are easier to use instead of DTML.

  File 
/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_var.py, 
line 207, in render

raise KeyError(name)
KeyError: u'date'

 Any idea what I could be doing wrong ? No dtml tag I use seems to 
work - all throw an error.


This error says that there is nothing known as date.
Have you defined it anywhere?
If you just want to show the current date, try:

dtml-var expr=DateTime()



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


___
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 )