[Zope-dev] zpatterns-0.4.0a5: problem with unregistering transactionals

2000-07-26 Thread Jephte CLAIN

hello,

I have a case where Transactional._unregister is called without
Transactional._register being called, raising an exception in
Transaction._unregister and then in
ZODB.Transaction.Transaction.__del__, causing Zope to dump core when it
is run as a daemon (because python notifies of the unhandled exception
by writin to stderr)

I have not yet found why (and how?) an object is
Transactional._unregistered without being Transactional._registered
before. (I even did not know about the existence of these methods!) But
until I understand, this patch allow me to stay alive:

--- Transactions.py.origThu Jul 20 09:58:00 2000
+++ Transactions.py Wed Jul 26 11:12:25 2000
@@ -45,7 +45,8 @@
 self._v_registered = 1
 
 def _unregister(self):
-del self._v_registered
+try: del self._v_registered
+except: pass
 
 
 # From here down, override as you see fit...

more to come when I have the time to figure out the problem. it might be
a bug in zpatterns :-)

regards,
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB....

2000-07-26 Thread Toby Dickenson

On Tue, 25 Jul 2000 18:07:06 +0200, [EMAIL PROTECTED] wrote:

I want to develop an external program that can store and retrieve 
an Object (such as a Person) in the ZoDB

That sounds a bit cruel.

I tried the example that I found in the How to's but it doesn't works  
In fact, I have the following message :
ZODB.FileStorage(file) 
attribute Error : FileStorage

--But I have imported ZODB

And, when I try to import ZODB.FileStorage : the program stops with the 
following message :
TypeError : call of non-function type 

what's wrong ?

You are trying to call an object, and that object is not callable.

Normally that error message should include the name of the type of the
object that is being abused

 "hello"()
Traceback (innermost last):
  File "stdin", line 1, in ?
TypeError: call of non-function (type string)

Either you truncated the message when you posted the message, or there
is something strange with the object's type.

Unless you are using a pre-release python 1.6 or 2.0 - If so the name
of your type might not get printed if it is unicode


Toby Dickenson
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] display of SQL request answer

2000-07-26 Thread Vincent DELHOMMOIS

Hi,

I am using the Z ODBC DA connexion to access an "Access" database via ODBC.

I created a connexion - No problem
An SQL method - No problem

How can I customise the display of the answer of the SQL request ?

Thanks a lot.

Vincent


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB....

2000-07-26 Thread Carlos Neves

On Tue, 25 Jul 2000, [EMAIL PROTECTED] wrote:
 Hi, 
 
 I want to develop an external program that can store and retrieve 
 an Object (such as a Person) in the ZoDB
 I tried the example that I found in the How to's but it doesn't works  
 In fact, I have the following message :
 ZODB.FileStorage(file) 
 attribute Error : FileStorage
 
 --But I have imported ZODB
 
 And, when I try to import ZODB.FileStorage : the program stops with the 
 following message :
 TypeError : call of non-function type 
 
 what's wrong ?
 
 did Anybody have an example like this... ? 
 Can anybody help me ?
 

Start by doing this:

import ZODB.FileStorage

ref = ZODB.FileStorage.FileStorage('YourData.fs')


and take it from here...
-- 
"Sometimes I think the surest sign that intelligent life exists elsewhere
in the Universe is that none of it has tried to contact us."

Carlos Neves
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZPatterns

2000-07-26 Thread Steve Alexander

[EMAIL PROTECTED] wrote:
 
 Hi,
 I wonder where I can find lots of information about the Zpatterns.
 It seems wonderfull but a little hard to understand.
 I want to know exactly how it works and what it does.

Use the http://www.zope.org search box to look for "ZPatterns".

Unfortunately, there is a problem with that particular search right now.
(I've already passed the details on to the zope webmaster.)

Also, look here:

  http://www.zope.org/Members/pje/ZPatterns

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] RE: [Zope] Re: Probably ZopeFind Bug

2000-07-26 Thread Brian Lloyd

 By now, I know why we get this strange "objectValues__roles__"
 result inside ZopeFind.
 
 In "FindSupport:145", "ZopeFind" strips away the acquisition
 context of an object.

Thanks Dieter, I've checked in a fix for this.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZPatterns

2000-07-26 Thread Oleg Broytmann

On Wed, 26 Jul 2000, Steve Alexander wrote:
   http://www.zope.org/Members/pje/ZPatterns

   Very limited resource in terms of documentation. :(

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Need for aq_base in DTML(was: Re: [Zope] Dumb DTML question - existance check of an object) (was: Re: [Zope] Dumb DTML question - existance check of an object)

2000-07-26 Thread Dieter Maurer

Satheesh Babu writes:
  I have a URL, say, /sub1/sub2. How do I check in DTML
  whether
1. folder sub1 exists or not
2. If not, create it.
3. folder sub2 exists under sub1
4. If not, create it.
It is easy, if you are a bit sloppy.

 * Access to "/": "PARENTS[-1]"
 * Existence check: "_.hasattr(object,what)"
 NOTE, that this is the sloppy part.

  - "_.hasattr" will return true, if "object" has
attribute "what" (that is what we want)
*OR* when it has acquired such an attribute
(we do *NOT* want that here).

What we would need is a DTML accessible version
of "aq_base". This is trivially handled by
an external method.

  - it returns true, when there is such an attribute.
This may not be a folder.

You can check "meta_type" to see, it is indeed a folder.

 * creation: "manage_addFolder"
 look in the ZDP's (http:zdp.zope.org) object reference
 for the function's signature.

 I think, this info is available in the Zope 2.2 help system, too.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Re: Need for aq_base in DTML (was: Re: [Zope] Dumb DTML question - existance check of an object)

2000-07-26 Thread Satheesh Babu

I made a DTML method which works, but doesn't do it
recursively. I'll try external methods.

Thanks..

dtml-if fname
 dtml-try "_.getitem(_['fname'],1)"
   dtml-with "_.getitem(_['fname'],1)"
dtml-var title
dtml-unless "meta_type=='Folder'"
  Item exists, but not a folder
/dtml-unless
   /dtml-with
 dtml-except
   Folder not found
   dtml-if ftitle
dtml-try
   dtml-call "manage_addFolder(_['fname'],_['ftitle'])"
Folder Created
dtml-except
   Folder could not be created
/dtml-try
   dtml-else
dtml-try
  dtml-call "manage_addFolder(_['fname'],_['fname'])"
   Folder Created
dtml-except
   Folder could not be created
/dtml-try
   /dtml-if
 /dtml-try
/dtml-if fname
- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Satheesh Babu [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 26, 2000 3:27 PM
Subject: Need for "aq_base" in DTML (was: Re: [Zope] Dumb DTML question -
existance check of an object)


 Satheesh Babu writes:
   I have a URL, say, /sub1/sub2. How do I check in DTML
   whether
 1. folder sub1 exists or not
 2. If not, create it.
 3. folder sub2 exists under sub1
 4. If not, create it.
 It is easy, if you are a bit sloppy.

  * Access to "/": "PARENTS[-1]"
  * Existence check: "_.hasattr(object,what)"
  NOTE, that this is the sloppy part.

   - "_.hasattr" will return true, if "object" has
 attribute "what" (that is what we want)
 *OR* when it has acquired such an attribute
 (we do *NOT* want that here).

 What we would need is a DTML accessible version
 of "aq_base". This is trivially handled by
 an external method.

   - it returns true, when there is such an attribute.
 This may not be a folder.

 You can check "meta_type" to see, it is indeed a folder.

  * creation: "manage_addFolder"
  look in the ZDP's (http:zdp.zope.org) object reference
  for the function's signature.

  I think, this info is available in the Zope 2.2 help system, too.


 Dieter



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Need for aq_base in DTML(was: Re: [Zope] Dumb DTML question - existance check of an object)(was: Re: [Zope] Dumb DTML question - existance check of an object)

2000-07-26 Thread Steve Alexander

Dieter Maurer wrote:
 
  * Access to "/": "PARENTS[-1]"
  * Existence check: "_.hasattr(object,what)"
  NOTE, that this is the sloppy part.
 
   - "_.hasattr" will return true, if "object" has
 attribute "what" (that is what we want)
 *OR* when it has acquired such an attribute
 (we do *NOT* want that here).
 
 What we would need is a DTML accessible version
 of "aq_base". This is trivially handled by
 an external method.

Can you do this with the following in DTML?

  dtml-with "PARENTS[-1]" only
dtml-if "_.hasattr(object, what)"
...stuff...
/dtml-if
  /dtml-with

Not tested, but it looks right to me.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope] DTML problem

2000-07-26 Thread Wolfgang Klinger

Hi!


I use the following expression in a header file
which is included in every document/method
to get the content of the actual folder and
show the title as menue item.

 dtml-in expr="PARENTS[0].objectValues(['DTML Document'])" sort=title
  
  tr
tda href="dtml-var "absolute_url()""dtml-var title/a/td
  /tr

 /dtml-in

But I don't want to show the current "DTML Document" as part 
of the menue.


example:

Communication (Folder)
 |
 |
 |- default_html_header (DTML Method)
 |
 |- Contact (Folder)
 |   |
 |   |- index_html (DTML Document)
 |   |- contact_addForm (DTML Document)
 |   |- 
 |
 |- News (Folder)
 .   |
 .   |- index_html (DTML Document)
 |- 

ok, default_html_header uses the dtml expression above
and is included in every other document/method/whatever ...

contact_addForm includes default_html_header and
I don't want to show contact_addForm in the menue

How can I exclude the current document?

TIA
Wolfgang





___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DTML problem

2000-07-26 Thread George Donnelly

this is probably a hack but you could use the id of the document you want to
exclude with an unless statement.  this is what i did when i wanted to
exclude the index_html doc

dtml-in "PARENTS[0].objectValues(['DTML Document'])" reverse
sort=bobobase_modification_time
dtml-unless "_.string.find(_['id'],'index_html')==0"
pa href="dtml-var URL1/dtml-var id"dtml-var title/abr
dtml-if jdatedtml-var jdatebr/dtml-if
dtml-if summary dtml-var summarybr/dtml-if
last modified: dtml-var bobobase_modification_time fmt=pCommonp
/dtml-unless
/dtml-in

hth

Regards,
GEORGE DONNELLY
[EMAIL PROTECTED]
http://cyklotron.com/
Part of becoming a writer is the desire to have everything mean something.
--Louise Erdrich

 But I don't want to show the current "DTML Document" as part
 of the menue.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Problem with ZCatalog output and SiteAccess (with workaround)

2000-07-26 Thread Marcin Kasperski

In short: ZCatalog getpath method returns sth. like
'/public/the/path/to/found/object'
It causes the problem when one uses SiteAccess to modify URL paths
(let's say I use Apache mod_proxy to redirect http://my.host/zope to
http://my.host:8080/public and set SiteAccess in public zope dir to
return http://my.host/zope). URL's generated from ZCatalog searches via
'tutorial way':

a href="dtml-var "catalog.getpath(data_record_id_)""

does not work. I get sth like
http://my.host/public/the/path/to/found/object (and Apache claims no
/public directory on server).

The problem can be solved via via converting fully specified link
returned by getpath to relative link (in most cases it is enough to
split this string on slash, remove 2 leading items and join it again) -
then I get correct URL without SiteAccess intervention.

Code snippet from zcatalog search result form:

dtml-comment
   This does not work with SiteAccess/proxying
  a href="dtml-var "catalog.getpath(data_record_id_)""
/dtml-comment
dtml-let page_path="catalog.getpath(data_record_id_)"
  page_split="_.string.split(page_path,'/')" 
  final_path="_.string.join(page_split[2:],'/')" 
 a href="dtml-var "final_path""
/dtml-let
 dtml-var title/a

This is rather workaround than clean solution. I can imagine two 'true'
solutions:
- patching ZCatalog to return relative URLs only
- patching SiteAccess to do something with '/such/urls' (is it
possible?)

--
Marcin.Kasperski | You have the right to change your mind, to substitute
  @softax.com.pl | functionality, and to change priorities. (Ken Beck's 
Marcin.Kasperski | Third Customer Right)
@bigfoot.com |

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] How can I proxy from apache to zope and keep source host info?

2000-07-26 Thread Marcin Kasperski

I configure 'apache as frontent do zope'. Most things work as expected
but I found serious limitation: if I pass request from apache to zope
via mod_proxy (or mod_rewrite [P]), zope sees all requests as coming
from localhost (I specified http://localhost:8080/ as zope address, in
case I specify http://my.host:8080 I would get my.host as source address
- the problem would be the same).

Does there exist any solution to this problem different than using
zope.cgi?


--
Marcin.Kasperski | Communication takes place between people, documents  
  @softax.com.pl | are secondary.  (Booch,Martin,Newkirk)   
Marcin.Kasperski |  
@bigfoot.com |

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Your feedback: what should DateTime strftime() behavior be?

2000-07-26 Thread Jerome Alet


my vote is: +1

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DTML problem

2000-07-26 Thread Bill Anderson

Wolfgang Klinger wrote:
 
 Hi!
 
 
 I use the following expression in a header file
 which is included in every document/method
 to get the content of the actual folder and
 show the title as menue item.
 
  dtml-in expr="PARENTS[0].objectValues(['DTML Document'])" sort=title
 
   tr
 tda href="dtml-var "absolute_url()""dtml-var title/a/td
   /tr
 
  /dtml-in
 
 But I don't want to show the current "DTML Document" as part
 of the menue.

IIRC, I do something like this 
dtml-in expr="PARENTS[0].objectValues(['DTML Document'])" sort=title
   dtml-unless "this() == _['sequence-item']"
   tr
 tda href="dtml-var "absolute_url()""dtml-var title/a/td
   /tr
   /dtml-unless this is the document
/dtml-in

But I could be wrong, I don't have it handy, ATM.




--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Bill Anderson

I now have it working again.
 Steps I took
--

o Use the pcgi directory from 2.1.6 
o Put "PCGI_CLOSE_FDS=0" in Zope.pcgi 
o rerun w_pcgi.py

This seems to be working, though I haven't rebooted the machine


The real solution is that DC should fix the new pcgi 

I would like to know why all of a sudden, I need the PCGI_CLOSE_FDS=0 bit, especially.



--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: Probably Zope Bug (was: Re: [Zope] all DTML Methods of current folder and subfolder)

2000-07-26 Thread Jerome Alet

On Wed, 26 Jul 2000, Dieter Maurer wrote:

 I analysed this strange behavior in Zope 2.1.6
 and have a partial explanation.

Hi,

thank you very much for your time, your explanations and your workaround.

I'll test this ASAP and tell you the result.

thanks again.

bye,

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] PCGI still not functional

2000-07-26 Thread Aleksander Salwa


On Mon, 24 Jul 2000, Bill Anderson wrote:

 In the 2.2betas, and in 2.1.6, I could use ZServer and PCGI, but now, I get
 one or the other.

Do you mean that you could use (with earlier Zopes) _BOTH_ ZServer and
PCGI at the same time ? Why ?
And now, you can get up and running one of them; or you can't run PCGI at
all ?

Maybe I'm missing something about architecture of Zope,
explain me if so :)

What HTTP server do you use ?

I use Zope with Apache (on RedHat Linux), and now I wonder how hard it
will be to upgrade to 2.2.0 :(


BTW: could someone (Jeff Rush ?) make rpm packages of Zope, as it was with
2.1.6, divided into Zope, Zope-zserver and Zope-pcgi ?

ololo


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Limiting folder space

2000-07-26 Thread Oleg Broytmann

Hello!

   ZODB (like any other filesystem-like storage) should has "qouta"
support. But while it is not implemented I'd like to hear your recipe.

On Tue, 25 Jul 2000, Bill Anderson wrote:
 Brendon Grunewald wrote:
  
  I want to use Zope to offer registered visitors to my site a little free
  webspace on the site. Since I use hosting service that restricts and charges
  me for space, I would like to restrict the size that their zope folders can
  consume.
  
  Hence:
  Is there any simple way of limiting the amount of space that a folder is
  allowed to consume including its subfolders? Alternatively, is there anyway
  of checking how much space a folder with subfolders consumes?
 
 Short answer: no.
 
 Longer Answer:
 Not under thattype of setup, There ar emethods that could be used now to do this, 
but the
 ones I come up with off the top of my head require system level access.

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] timezone change and permission problem

2000-07-26 Thread Bart Holthuijsen

From: Dieter Maurer [EMAIL PROTECTED]

Bart Holthuijsen writes:
   When I create / edit a document it says: Content changed, then date / 
time
   and GMT+2.
Why are you unhappy with the timezone? Is it not correct?

Almost surely, Zope will ask the operating system for the
timezone. You may try to set the environment variable TZ
to cheat.


Dieter

Thank you for your help!

Oh, I forgot to mention an important detail. I'm in GMT+1 and that is also 
what I have set Windows NT to.

The previous installation of Zope (2.1.4) showed the right time, after the 
upgrade it changed to GMT+2. Can anyone help me with changing this back? (if 
not, then I'll try the environment variable)

Kind regards,
Bart Holthuijsen

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] PCGI still not functional

2000-07-26 Thread Bill Anderson

Aleksander Salwa wrote:
 
 On Mon, 24 Jul 2000, Bill Anderson wrote:
 
  In the 2.2betas, and in 2.1.6, I could use ZServer and PCGI, but now, I get
  one or the other.
 
 Do you mean that you could use (with earlier Zopes) _BOTH_ ZServer and
 PCGI at the same time ? Why ?

Several reasons. One, is that I have many sites that require a login. I _like_ being 
able
to connect directly to ZServer via port number to login as manager, and as user to the
same site.

I run Zope both on it's own, and behind Roxen. On some sites I use RXML 'written' by 
Zope
to enhance the site. I often connect directly to Zope via port number to debug RXML 
stuff.

Another reason, is I occasionally run benchmarks, and it is nice to be able to test
against Roxen/Zope-through-pcgi, and straight Zope.

 And now, you can get up and running one of them; or you can't run PCGI at
 all ?

See my latest post, form tonight.

Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Limiting folder space

2000-07-26 Thread Bill Anderson

Oleg Broytmann wrote:
 
 Hello!
 
ZODB (like any other filesystem-like storage) should has "qouta"
 support. But while it is not implemented I'd like to hear your recipe.

I don't beleive ZODB is a 'filesystem-like' storage, as it is an Object Database. The
problem (well, one of them anyway ;) would be determining just how much 'space' a given
object is consuming.

Now, what I am doing, is to use the Mountable Database (?) product to mount a given
client's site on. I then calculate storage based upon the size of that particular 
Data.fs,
and then:

 o let the fs handle the quota for the user
 --or--
 o run cron jobs to monitor size of the 
   Data,fs-es, and notify me of any over 
   a specified limit.

I have the two methods because I offer varying levels of server options; some have user
accounts, others do not.

I am migrating to ZEO, but am currently experiencing some difficulty with the
aforementioned  product, but will soon have a new one to take the place. :-)

Bill


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] How can I proxy from apache to zope and keep source host info?

2000-07-26 Thread Phil Harris

There is a patch to Apache that you could apply that passes the client IP
along in a different HTTP header, if that helps.

It's at http://modules.apache.org/search?id=124.

On the other hand you could use Squid as the Proxy as it has a config
directive for just this occasion.

HTH

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Marcin Kasperski" [EMAIL PROTECTED]
To: "Zope List Submission" [EMAIL PROTECTED]
Sent: Wednesday, July 26, 2000 8:26 AM
Subject: [Zope] How can I proxy from apache to zope and keep source host
info?


 I configure 'apache as frontent do zope'. Most things work as expected
 but I found serious limitation: if I pass request from apache to zope
 via mod_proxy (or mod_rewrite [P]), zope sees all requests as coming
 from localhost (I specified http://localhost:8080/ as zope address, in
 case I specify http://my.host:8080 I would get my.host as source address
 - the problem would be the same).

 Does there exist any solution to this problem different than using
 zope.cgi?


 --
 Marcin.Kasperski | Communication takes place between people, documents
   @softax.com.pl | are secondary.  (Booch,Martin,Newkirk)
 Marcin.Kasperski |
 @bigfoot.com |

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Limiting folder space

2000-07-26 Thread Oleg Broytmann

Thanks!

On Wed, 26 Jul 2000, Bill Anderson wrote:
 Now, what I am doing, is to use the Mountable Database (?) product to mount a given
 client's site on. I then calculate storage based upon the size of that particular 
Data.fs,
 and then:
 
  o let the fs handle the quota for the user
  --or--
  o run cron jobs to monitor size of the 
Data,fs-es, and notify me of any over 
a specified limit.
 
 I have the two methods because I offer varying levels of server options; some have 
user
 accounts, others do not.
 
 I am migrating to ZEO, but am currently experiencing some difficulty with the
 aforementioned  product, but will soon have a new one to take the place. :-)

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Your feedback: what should DateTime strftime() behavior be?

2000-07-26 Thread John Chandler

   +1 == agree
 
   +/-0 == no strong opinion
 
   -1 == disagree

+1


(If anyone *does* have an objection, they'd better get in quick before
it's too late!) ;-)


John

--
 John Chandler  /  Software Developer  /  New Information Paradigms Ltd
   [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ]

 The opinions above aren't those of my company...
   ...but then, they aren't really mine either.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Lines data type possible in boolean OR's?

2000-07-26 Thread Martijn Pieters

On Mon, Jul 24, 2000 at 11:56:01PM +0200, Alexander Limi wrote:
 I have a small problem. When I use the lines data type in OR statements, I
 get an
 
 Error Type: TypeError
 Error Value: bad operand type(s) for |
 
 I've used them earlier on integers, like this:
 
 dtml-if "cabinDouble | cabinTwin | cabinBunk | cabinPullman"
 
 and it works fine. When I try the same with other data types, like this:
 
 dtml-if "toy | additionalToys"
 
 where "toy" is a "multiple select" type and "additionalToys" is a "lines"
 type. Can anyone provide me with some hints on what to do to get it working
 the way I want? Is typecasting necessary?

A pipe symbol in python ('|') is a bitwise 'or', so it works on integers yes.
I assume you want to to a boolean 'or', wich in python is the keyword 'or':

  dtml-if "cabinDouble or cabinTwin or cabinBunk or cabinPullman"

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Python/Tkinter Zope

2000-07-26 Thread Gijs Reulen

Would it make any sense ? Such an application could only run on the server.
Not exactly the idea of a web-enabled application ?! To use it on a client
at least Python and TKinter should be installed on the client. This would
only be feasable in a corporate environment, but then, why still use Zope ?
I think I do not know what you want with the combination of GUI and Zope.

Gijs

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Tim Cook
 Verzonden: woensdag 26 juli 2000 5:03
 Aan: Zope List
 Onderwerp: [Zope] Python/Tkinter  Zope


 Has anyone used this combination for GUI inside a Zope app?

 -- Tim Cook --
 FreePM Project Coordinator - http://www.freepm.org
 OS Healthcare Alliance Supporter - http://www.oshca.org

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with ZCatalog output and SiteAccess (with workaround)

2000-07-26 Thread Chris McDonough

Marcin,

Can you post this problem in to the Collector? 
http://classic.zope.org:8080/Collector.  I think there's a simple fix to
make ZCatalog play nicely with Site Access, and if it's in the
collector, we won't forget about it.

Marcin Kasperski wrote:
 
 In short: ZCatalog getpath method returns sth. like
 '/public/the/path/to/found/object'
 It causes the problem when one uses SiteAccess to modify URL paths
 (let's say I use Apache mod_proxy to redirect http://my.host/zope to
 http://my.host:8080/public and set SiteAccess in public zope dir to
 return http://my.host/zope). URL's generated from ZCatalog searches via
 'tutorial way':
 
 a href="dtml-var "catalog.getpath(data_record_id_)""
 
 does not work. I get sth like
 http://my.host/public/the/path/to/found/object (and Apache claims no
 /public directory on server).
 
 The problem can be solved via via converting fully specified link
 returned by getpath to relative link (in most cases it is enough to
 split this string on slash, remove 2 leading items and join it again) -
 then I get correct URL without SiteAccess intervention.
 
 Code snippet from zcatalog search result form:
 
 dtml-comment
This does not work with SiteAccess/proxying
   a href="dtml-var "catalog.getpath(data_record_id_)""
 /dtml-comment
 dtml-let page_path="catalog.getpath(data_record_id_)"
   page_split="_.string.split(page_path,'/')"
   final_path="_.string.join(page_split[2:],'/')" 
  a href="dtml-var "final_path""
 /dtml-let
  dtml-var title/a
 
 This is rather workaround than clean solution. I can imagine two 'true'
 solutions:
 - patching ZCatalog to return relative URLs only
 - patching SiteAccess to do something with '/such/urls' (is it
 possible?)
 
 --
 Marcin.Kasperski | You have the right to change your mind, to substitute
   @softax.com.pl | functionality, and to change priorities. (Ken Beck's
 Marcin.Kasperski | Third Customer Right)
 @bigfoot.com |
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: display of SQL request answer

2000-07-26 Thread Chris McDonough

Vincent,

This may be helpful: 
http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.1.4.html

Also, this question is more suited for the main Zope mail list
([EMAIL PROTECTED])... I've moved it there as a result.

Vincent DELHOMMOIS wrote:
 
 Hi,
 
 I am using the Z ODBC DA connexion to access an "Access" database via ODBC.
 
 I created a connexion - No problem
 An SQL method - No problem
 
 How can I customise the display of the answer of the SQL request ?
 
 Thanks a lot.
 
 Vincent
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: Problem

2000-07-26 Thread Chris McDonough

Anvita,

JavaScript is inlined in a DTML method just like it would be inside a
file on a filesystem.  Because JavaScript runs on the client, you just
need to make sure that you return it somehow in the response to the
client.  There is no "magic" to doing this... as a simple example:

- create a DTML method with the following body:

HTML
HEAD
TITLETest/TITLE
/HEAD
BODY
script
alert('hi')
/script
/HTML

- view it

You should see a JavaScript alert box in your browser.

-
Dear Sir, 
 
Thanx for promt reply. 
 
I could get some help but still unable to find some material abt "how to
call JavaScript while creating our
site using Zope". I tried but couldn't succeed. I would be thankful if
you'll tell me something about it too.
 
Thanking you,
 
Yours truly,

Anvita Bajpai
Research Engineer
IIT Kanpur - India.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Updating product property sheet values

2000-07-26 Thread Paul Smith

Hi

I have just been asked to stop banging my head against the wall, as it 
is annoying other people in the office, so I turn to you all in the 
hope you can help!

I am trying to create a moderated news bulletin board, and have based 
the back-end loosely on the Job Board engine, as "Created by mukhsein" 
and available as a How to on Zope.org.

So far, I have successfully implemented the posting of news items, and 
have assigned them a property sheet value which means that I can 
display items which I have manually created with a 'live' value. The 
property sheet has 3 properties, news_title, news_content and live - 
live being a flag indicating whether the news item has been moderated. 
Default is '1' for unmoderated.

I have also created an 'update form' which displays all the news items 
which are ready to be moderated ('live' value of 1). What I am failing 
miserably to do, is update the property sheet value, so that the news 
items are displayed in the 'live' list, rather than the to-be-moderated
list. I want to be able to do this by submitting the moderated news 
item, and changing the value "live" from a '1' to a '0'. I am attempting
to do this by sending a value as a hidden value within a form when the 
news item is submitted.

I know that I am being pretty vague in this summation, but am 
interested to know if anyone can point me in the right direction - if 
you require code samples, I can provide, but really the base code is 
pretty similar to that of the Job Board 
(http://www.zope.org/Members/mukhsein/job_board_howto)
without the search element.

Any guidance will be greatly appreciated.

Paul
-
Paul Smith : [EMAIL PROTECTED]  
http://www.ilrt.bris.ac.uk/
Institute for Learning and Research Technology
University of Bristol,  BS8 1HH, UK   
Tel: 0117 928 7192 Fax: 0117 928 7112


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Updating product property sheet values

2000-07-26 Thread Chris Withers

On Wed, 26 Jul 2000, Paul Smith wrote:
 I am trying to create a moderated news bulletin board, and have based 
 the back-end loosely on the Job Board engine, as "Created by mukhsein" 
 and available as a How to on Zope.org.

Why not use Squishdot?

I know you've looked at it so I'd be interested to know why you needed to
re-implement it :S

cheers,

Chris


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] zzLocale 0-0-3a released on Zope Japan

2000-07-26 Thread Johan Carlsson


 "Johan Carlsson" [EMAIL PROTECTED] wrote:
 
  Are there any plans on expanding the framework to include
  python embedded strings.
 
 Yes there is, and that's what the development of zzLocale is now
 centered on. We are still in an early design stage, so I cannot give you
 much information or any expected release date, but the next version of
 zzLocale will definitively include some python-embedded strings
 localization features.
 

That's absolutly brilliant!

What are the performance impact of the zzLocale?
Do more installed translations effect performance in any way.

//Johan



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




re: [Zope] Zope performance ratios

2000-07-26 Thread Jarkko Veijalainen

I'm doing a performance comparance between Zserver and Iplanet servers
packages in next couple of weeks, maybe with Apache and Netscape servers
too. We have building a prototype with four different sripting languages,
including Zope. Goal is to find out wich combination is most effective.
Maybe i can post some results here, when my reasearch is done.

jarkkov

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 24. heinäkuuta 2000 20:54
To: [EMAIL PROTECTED]
Subject: [Zope] Zope performance ratios


I'm interested in getting performance statistics for Zope. I'm scouring the
mailing lists for previous messages but I would also be interested in
anything else people may want to say about it. For example, what is the
record for average web hits from a Zope site? Does someone have a feel for
useful ratios like: "a Zope page takes, on average, twice as a static page
to serve"? I'm not interested in being anal about the numbers, seat of
the pants estimates are what I'm looking for.

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
--

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] problem with manage_permission

2000-07-26 Thread Jerome Alet

Hi,

I'm currently trying to create a python product.

I've got a class named MyClass, and in the __init__ method I've got the
following code:

self.manage_addFolder(id="data", title="MyClass instance's datas")
self._addRole('admin')  
self.manage_permission(permission_to_manage = 
  "Access contents information" , roles = [ 'Manager', 'admin' ]) 

MyClass inherits from Folder. 

I want to programmatically create a 'data' Folder and an 'admin' role in
each new instance of MyClass, and give this role and Manager (but not
Anonymous)  the "Access contents information"  permission.

The manage_addFolder and _addRole work fine, but the manage_permission
call gives me the following traceback: 

Error Type: AttributeError
Error Value: aq_acquire

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: manage_addMyClass)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in
call_object
(Object: manage_addMyClass)
  File /usr/local/zope/lib/python/Products/MyClass/MyClass.py, line
45, in
manage_addMyClass
  File /usr/local/zope/lib/python/Products/MyClass/MyClass.py, line 153,
in __init__
(Object: ElementWithAttributes)
  File /usr/local/zope/lib/python/AccessControl/Role.py, line 208, in
manage_permission
(Object: ElementWithAttributes)
  File /usr/local/zope/lib/python/AccessControl/Role.py, line 136, in
ac_inherited_permissions
(Object: ElementWithAttributes)
  File /usr/local/zope/lib/python/OFS/ObjectManager.py, line 173, in
_subobject_permissions
(Object: ElementWithAttributes)
AttributeError: (see above)

Surprisingly, if I delete the manage_permission line, restart Zope, re-add
an instance of MyClass (it works), then try to manually modify the
permissions using the MyClass instance's security tab, then it works
flawlessly. 

Does anyone have got an idea about where the problem may come from ?

thanks in advance.

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Lines data type possible in boolean OR's?

2000-07-26 Thread Alexander Limi


- Original Message -
From: "Martijn Pieters" [EMAIL PROTECTED]

 On Mon, Jul 24, 2000 at 11:56:01PM +0200, Alexander Limi wrote:
  I have a small problem. When I use the lines data type in OR statements,
I
  get an
 
  Error Type: TypeError
  Error Value: bad operand type(s) for |
 
  I've used them earlier on integers, like this:
 
  dtml-if "cabinDouble | cabinTwin | cabinBunk | cabinPullman"
 
  and it works fine. When I try the same with other data types, like this:
 
  dtml-if "toy | additionalToys"
 
  where "toy" is a "multiple select" type and "additionalToys" is a
"lines"
  type. Can anyone provide me with some hints on what to do to get it
working
  the way I want? Is typecasting necessary?

 A pipe symbol in python ('|') is a bitwise 'or', so it works on integers
yes.
 I assume you want to to a boolean 'or', wich in python is the keyword
'or':

I figured that out after a while, but the original problem remained: The
Lines type does not evaluate to FALSE in boolean expressions, even when
empty.

Empty lines are contain [''], so I have to use a string.join() to get it to
be '', which evaluates to false.

I know lines is a set of some sort, but shouldn't it evaluate to FALSE in
boolean expressions anyway? Is there a reason why it doesn't?

--
Alexander Limi
[EMAIL PROTECTED]




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Slow ODBC source

2000-07-26 Thread Jelle Gerbrandy

I'm retrieving data from an Access database, on windows 98, via an ODBC
connection, and my problem is that it is very very slow: retrieving 1 record
is fast enough, but retrieving 20 records takes 20 seconds, occupies my CPU
completely and has my harddisk running hard.

I've done a little bit of testing, and the time it takes to retrieve the
data seems not be related to the complexity of the query or the number of
records, but to the amount of information retrieved (i.e. retrieving long
strings takes much longer than small numbers).

Any suggestions?

Jelle


__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Slow ODBC source

2000-07-26 Thread Oleg Broytmann

On Wed, 26 Jul 2000, Jelle Gerbrandy wrote:
 I'm retrieving data from an Access database, on windows 98, via an ODBC
 connection, and my problem is that it is very very slow: retrieving 1 record
 is fast enough, but retrieving 20 records takes 20 seconds, occupies my CPU
 completely and has my harddisk running hard.
 
 I've done a little bit of testing, and the time it takes to retrieve the
 data seems not be related to the complexity of the query or the number of
 records, but to the amount of information retrieved (i.e. retrieving long
 strings takes much longer than small numbers).
 
 Any suggestions?

   Using Win98 for database and WWW? No.

Upgrade!

   win98 = Linux of FreeBSD
   Access = PostgreSQL or MySQL or Interbase
   ODBC DA = corresponding DA

   FreeBSD is pretty stable, but is a bit harder to install and maintain for
novice. Linux is simpler, if you use user-oriented distribution (SuSe,
Caldera, Corel).

   MySQL is superfast, but supports only a limited subset of SQL.
PostgreSQL supports a good deal of complex SQL, but is a bit slow.
Interbase is relatively fast mid-range SQL server.

   All these DBs have Zope Database Adapters.

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Slow ODBC source

2000-07-26 Thread jacques



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Oleg
 Broytmann
 Sent: quarta-feira, 26 de julho de 2000 10:12
 To: Zope Mailing List
 Subject: Re: [Zope] Slow ODBC source


[snip]
  Any suggestions?

Using Win98 for database and WWW? No.

 Upgrade!

win98 = Linux of FreeBSD
Access = PostgreSQL or MySQL or Interbase
ODBC DA = corresponding DA

I´m NOT starting a OS war here but that sugestion is probably harder to
implement then upgrading to NT and SQL Server. If Jelle Gerbrandy is using
Win98/Access there must be a reason (I cannot think of any good one :) )
Maybe just changing Access to MySQL or Interbase (Interbase runs under
Win98, MySQL I´m not sure, I think it does) would be a middle term as
changing OS is a bigger move (I would change as in my opinnion Win98 is NOT
an end user OS not a developer one)

Jacques


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] (no subject)

2000-07-26 Thread Uros Midic

I'm trying to rewrite my ZClass as a python product.

In the ZClass I uploaded an applet (e.g. called MyApplet.class) in the
methods management screen, so that another method in the same ZClass could
reference it simply with APPLET CODE="MyApplet.class" (both the method and
the applet always had the same base URL, which was the object's URL).

Is there a way to store the applet file (MyApplet.class) in the python
product's folder and serve it so that its URL would be: object's
URL/MyApplet.class   ?

Uros



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Zope Sybase DA Zope 2.2

2000-07-26 Thread Stephen Nosal

Folks -

Anyone have any info or pointers running the Zope Sybase DA  Zope 2.2 yet?

I'm looking to get it up and running on suse Linux 6.4 and Zope 2.2 connecting to a 
remote Sybase DB.

Love to hear any news on this.

Thanks.

- Steve


__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Your feedback: what should DateTime strftime() behavior be?

2000-07-26 Thread Brian Lloyd

 |   -1 == disagree
 
 You will only ever see votes from people wanting change... 
 apathy rules
 otherwise. Then when it changes you'll see a whole bunch of 
 bitching about 
 the change, and how there's 1,000 people on the list and only 
 20 people
 voted... etc. d8) Mailling list votes are often a bad idea...

I don't know of a better one though :( We have exactly the same 
problem in the Real World, of course. The alternative is to have 
some arbitrary group trying to guess the right decision, which 
will (of course) always lead to an equal or greater amount of 
bitching :)

I'll be moving off the list to some sort of web-poll, but the 
fact will remain that those who only become opinionated after 
the fact will never be happy :)

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Zope Sybase DA Zope 2.2

2000-07-26 Thread Chris McDonough

What's the problem?  Does it not work?

 -Original Message-
 From: Stephen Nosal [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 26, 2000 10:00 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zope Sybase DA  Zope 2.2
 
 
 Folks -
 
 Anyone have any info or pointers running the Zope Sybase DA  
 Zope 2.2 yet?
 
 I'm looking to get it up and running on suse Linux 6.4 and 
 Zope 2.2 connecting to a remote Sybase DB.
 
 Love to hear any news on this.
 
 Thanks.
 
 - Steve
 
 
 __
 Get your Private, Anti-Spam, Free Email at http://e3mil.com 
 and Step into a Friendly Universe!
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )
 

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] WorldPilot 1.1.0 - Possible bug and solution ?

2000-07-26 Thread Paolo Bizzarri

Hi Zopers,

apparently, WorldPilot has an error in the getIMAPFolders function, that
do not allow the creation of folders. 

The line is the following:

cf.AddChild(IMAPFolder(Folder,TmpFolderFullName[:-1] , padding+Folder))


I have changed it in:

cf.AddChild(IMAPFolder(Folder,TmpFolderFullName[1:] , padding+Folder))

and now I can happily create folders and move messages around.

I am using courier IMAP on a Red Hat Linux.

Can someone confirm the patch ?

Many thanks

Paolo 

-- 
Paolo Bizzarri - Responsabile Marketing  I3 Icube Srl
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia 
E-mail: [EMAIL PROTECTED] WWW: www.icube.it   
Tel:(+39) 050 97 02 07  Fax: (+39) 050 31 36 588

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] problem with dtml-in and Zope 2.2

2000-07-26 Thread Steve Jibson



(I've seen other similar posts on the mailing list, but I haven't seen
the answer, so I'll re-phrase the question and hope someone can help.)


I've got an external method that returns a list of record objects:

def getRecords(self):

class record:
pass

r = record()
r.height = '25'
return [r]



Then I've got a dtml-document that uses this list:

dtml-in "getRecords()"
  dtml-var height
/dtml-in


This worked great before I upgraded to Zope 2.2, now when I "view" the
dtml-method, I get a popup asking for me to re-authenticate (which, of
course, fails every time).

The other posts I've seen similar to this have all involved using
dtml-in to iterate over the results of a database query.  It appears
that there may be a problem with dtml-in in Zope 2.2.

Please help!

Steve Jibson
Parlant Technology
[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Returning a file as a result of object's method?!?

2000-07-26 Thread Uros Midic

* I'm reposting this, because the first time I included no subject by
mistake, sorry *

I'm trying to rewrite my ZClass as a python product.

In the ZClass I uploaded an applet (e.g. called MyApplet.class) in the
methods management screen, so that another method in the same ZClass could
reference it simply with APPLET CODE="MyApplet.class" (both the method and
the applet always had the same base URL, which was the object's URL).

Is there a way to store the applet file (MyApplet.class) in the python
product's folder and serve it so that its URL would be: object's
URL/MyApplet.class   ?

Uros






___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Zope Sybase DA Zope 2.2

2000-07-26 Thread Stephen Nosal

Haven't gotten that far yet - I'm looking for 'gotchas' before I start.

I'm already having a tough time with the open client 11.9.2 - apparently it is not 
available for download anymore, but still free for development. I'm waiting for Sybase 
to get back to me on this one.

- Steve

On Wed, 26 July 2000, Chris McDonough wrote:

 
 What's the problem?  Does it not work?
 
  -Original Message-
  From: Stephen Nosal [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 26, 2000 10:00 AM
  To: [EMAIL PROTECTED]
  Subject: [Zope] Zope Sybase DA  Zope 2.2
  
  
  Folks -
  
  Anyone have any info or pointers running the Zope Sybase DA  
  Zope 2.2 yet?
  
  I'm looking to get it up and running on suse Linux 6.4 and 
  Zope 2.2 connecting to a remote Sybase DB.
  
  Love to hear any news on this.
  
  Thanks.
  
  - Steve
  
  
  __
  Get your Private, Anti-Spam, Free Email at http://e3mil.com 
  and Step into a Friendly Universe!
  
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  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 )
  
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] problem with dtml-in and Zope 2.2

2000-07-26 Thread Chris McDonough

First of all, make sure you don't try to define classes that should be
persistent in an external method... it wont work the way you expect it
to.

Second (untested):

def getRecords(self):
""" """
class record:
__allow_access_to_unprotected_subobjects__ = 1 
# this may be unnecessary?
pass

r = record().__of__(self)
r.height = '25'
return [r]

 -Original Message-
 From: Steve Jibson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 26, 2000 12:13 PM
 To: [EMAIL PROTECTED]
 Subject: [Zope] problem with dtml-in and Zope 2.2
 
 
 
 
 (I've seen other similar posts on the mailing list, but I haven't seen
 the answer, so I'll re-phrase the question and hope someone can help.)
 
 
 I've got an external method that returns a list of record objects:
 
 def getRecords(self):
 
 class record:
 pass
 
 r = record()
 r.height = '25'
 return [r]
 
 
 
 Then I've got a dtml-document that uses this list:
 
 dtml-in "getRecords()"
   dtml-var height
 /dtml-in
 
 
 This worked great before I upgraded to Zope 2.2, now when I "view" the
 dtml-method, I get a popup asking for me to re-authenticate (which, of
 course, fails every time).
 
 The other posts I've seen similar to this have all involved using
 dtml-in to iterate over the results of a database query.  It appears
 that there may be a problem with dtml-in in Zope 2.2.
 
 Please help!
 
 Steve Jibson
 Parlant Technology
 [EMAIL PROTECTED]
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )
 

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Nick Garcia

Bill Anderson wrote:
 
 o Use the pcgi directory from 2.1.6
 o Put "PCGI_CLOSE_FDS=0" in Zope.pcgi
 o rerun w_pcgi.py
 
 This seems to be working, though I haven't rebooted the machine

Hmmm... I was just trying to get 2.2.0 working with PCGI yesterday and
couldn't get it working either.  These instructions got it up and
running, but now I'm seeing something a bit strange and I was wondering
if you were seeing the same thing.  If I go to a page that doesn't
exist, I get this error:

Error Type: NameError
Error Value: URL

!--
Traceback (innermost last):
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
162, in publish
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/BaseRequest.py,
line 451, in traverse
NameError: (see above)

--

Is it just me?

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] simple dtml-if question

2000-07-26 Thread joel grimes

How do I do this?

I have a table with a field called SerialNumber.  I want to test it for null 
and return a non-breaking space if it's null.

Here's what I tried:

dtml-if "SerialNumber = null"nbsp;
dtml-elsedtml-var SerialNumber
/dtml-if

Doesn't work (be nice-I'm new).  I've tried various combinations of quotes - 
no quotes but apparently haven't hit it just right yet.

What I'm trying to do is stick SOMETHING in an empty cell so netscape 
doesn't remove my borders when it encounters the empty cell - is there an 
easy fix?

Thanks,

Joel



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Nick Garcia

Nick Garcia wrote:
 
 Hmmm... I was just trying to get 2.2.0 working with PCGI yesterday and
 couldn't get it working either.  These instructions got it up and
 running, but now I'm seeing something a bit strange and I was wondering
 if you were seeing the same thing.  If I go to a page that doesn't
 exist, I get this error:
 
 Is it just me?

[Answering my own post]

It's not just me, and it only happens when you don't have an index_html
at the root and you try to access just the domain (try it, it's fun!).

I'll put this in the Collector.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] zwiki mailing list ? RFC

2000-07-26 Thread Simon Michael


I'm getting a steady trickle of private mail, interesting comments 
patches, all of which would benefit the community but currently end up
mouldering in my mail archives.

I'm thinking of activating the zwiki mailing list at sourceforge, as a
repository for the above and perhaps a testbed for
mailing-list/zwikiweb integration.

On the other hand I'm against too much fragmentation of our
discussions - things are bad enough already! - and I like to use the
zope list where possible. 

If you have any thoughts either way, I'd like to hear 'em.

- Simon

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] new wiki functionality/zope.org issues

2000-07-26 Thread Otto Hammersmith

Simon Michael wrote:
 
[snip]
 4. could we auto-login with cookies like eg slashdot ? I'm never
 logged in when I need to edit a wiki and doing so is quite 
 disruptive. And, or, make the login page auto-redirect back to where 
 I came from.

I'd like that, as well.  Just make it a persistant cookie rather than a
session cookie, right?  I have having to re-type passwords and turned
off IE's autocomplete long ago. :)

Though, it is nice that the login page now has a link that uses the
Referer header. :)

-Otto.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Renderable ZClass and Zope 2.2

2000-07-26 Thread Jeff Sasmor

Hi-
I am trying to 'update' my EventFolder product to
Zope 2.2 but a  really wierd thing is going on:

When I try to create an instance (an EventFolder, which is
subclassed from Renderable and ObjectManager) I get an
error shown in the traceback below.

There EventFolder_add method in the ZClass creates a
catalog (Catalog) which does not seem to be accessable...

yet, why is the instance being renedered at all?  It appears
as if the instance is being rendered before the transaction
is committed and therefore there's no Catalog-- this I get. But
why is the instance being rendered at all?

Is there some incompatability with Renderable and 2.2?

Confusedly,

Jeff Sasmor
[EMAIL PROTECTED]

---
Error Type: AttributeError
Error Value: Catalog

Traceback (innermost last):
  File /usr/local/Zope220/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/local/Zope220/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/Zope220/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: RoleManager)
  File /usr/local/Zope220/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/local/Zope220/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: EventFolder_add)
  File /usr/local/Zope220/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: EventFolder_add)
  File /usr/local/Zope220/lib/python/OFS/DTMLMethod.py, line 167, in __call__
(Object: EventFolder_add)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_String.py, line 502, in 
__call__
(Object: EventFolder_add)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_Let.py, line 147, in render
(Object: folder="EventFolder.createInObjectManager(REQUEST['id'], REQUEST)")
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_With.py, line 146, in render
(Object: folder)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval
(Object: 
manage_addProduct['ZCatalog'].manage_addZCatalog(this(),'Catalog','EventCatalog' ))
(Info: this)
  File string, line 0, in ?
  File /usr/local/Zope220/lib/python/Products/ZCatalog/ZCatalog.py, line 112, in 
manage_addZCatalog
  File /usr/local/Zope220/lib/python/Products/Renderable/Renderable.py, line 17, in 
__str__
(Object: Renderable)
  File /usr/local/Zope220/lib/python/OFS/DTMLMethod.py, line 167, in __call__
(Object: render)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_String.py, line 502, in 
__call__
(Object: render)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_With.py, line 146, in render
(Object: ZopeTime)
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_Let.py, line 147, in render
(Object: tdate="'%s/%s/1' % (tyear,tmonth) "
  this_month="'%s/%s' % (tyear,tmonth) "
  ddate="_.DateTime(tdate)")
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_Let.py, line 147, in render
(Object: smeth="dateSearch.absolute_url()")
  File /usr/local/Zope220/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval
(Object: 
renderMonth(ddate,smeth,bodyFgColor,bodyBgColor,headingFgColor,headingBgColor, 
'showyear' , moderated))
(Info: smeth)
  File string, line 0, in ?
  File /usr/local/Zope220/lib/python/Products/ExternalMethod/ExternalMethod.py, line 
270, in __call__
(Object: renderMonth)
(Info: ((DateTime('2000/07/01'), 
'http://www.ptang.com:8080/test/asdasd/dateSearch', '#00', '#ff',
'#ff', '#00', 'showyear', 'on'), {}, None))
  File /usr/local/Zope220/lib/python/Products/EventFolder/Extensions/rendercal.py, 
line 97, in renderMonth
(Object: Renderable)
AttributeError: (see above)


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Question

2000-07-26 Thread Lionel Tafel



Hy everybody, i have a question?I need to 
know if i can change the setting when i create a folder in thezope. Because 
i create a folder and automaticly that create a fileindex.php3 with some 
data. I want to know if i can change the data orsetting the data that this 
index.php3 have into.

dtml-var 
standard_html_headerh2dtml-var 
title_or_id/h2pThis is the dtml-var id 
Document./pdtml-var standard_html_footerThank 
you very much, 


Re: [Zope] simple dtml-if question

2000-07-26 Thread Nick Garcia

joel grimes wrote:
 
 How do I do this?
 
 I have a table with a field called SerialNumber.  I want to test it for null
 and return a non-breaking space if it's null.
 
 Here's what I tried:
 
 dtml-if "SerialNumber = null"nbsp;
 dtml-elsedtml-var SerialNumber
 /dtml-if

dtml-var SerialNumber null="nbsp;"

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] SV: [Zope] simple dtml-if question

2000-07-26 Thread peter be

Correct me if I'm wrong.

If the SerialNumber is taken from a ZSQL method, shouldn't you been able to show it 
without testing its content.
Such as: 
dtml-var SerialNumbernbsp;

Those rows that have something other than 'null' would be shown together with a nbsp;.

Curious.

- Original Message - 
From: joel grimes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 26, 2000 6:14 PM
Subject: [Zope] simple dtml-if question


 How do I do this?
 
 I have a table with a field called SerialNumber.  I want to test it for null 
 and return a non-breaking space if it's null.
 
 Here's what I tried:
 
 dtml-if "SerialNumber = null"nbsp;
 dtml-elsedtml-var SerialNumber
 /dtml-if
 
 Doesn't work (be nice-I'm new).  I've tried various combinations of quotes - 
 no quotes but apparently haven't hit it just right yet.
 
 What I'm trying to do is stick SOMETHING in an empty cell so netscape 
 doesn't remove my borders when it encounters the empty cell - is there an 
 easy fix?
 
 Thanks,
 
 Joel
 
 
 
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )
 


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: simple dtml-if question

2000-07-26 Thread Capesius, Alan
Title: Re: simple dtml-if question





Joel that's really an HTML question.


Use BR in every table field that contains only dtml tags. It isn't required if there is any text in the table field.



Alan Capesius, MCSE
Technical Support Engineer
Sysmex Corporation of America
[EMAIL PROTECTED]





[Zope] RE: Slow ODBC source

2000-07-26 Thread Capesius, Alan
Title: RE: Slow ODBC source





I'm using an Access DB on NT Server without any trouble. It is very fast.
How large is the data you are retrieving? (bytes per record I mean)
My apps are typically running on a MDB with 10,000 records


I've noticed some issues that relate to Access queries. Here they are in the order I'd check them:


1) If Zope is running in a DOS window (haven't used it on 98) you might be running into a background processing problem. Use a PIF file to start it and make sure that Background processing is allowed. There is a checkbox to suspend in background I believe. What happens is that the app gets shut off when if doesn't have the focus and runs extremely slow if at all. Also your performance settings in the system tuning are may be set to provide foreground apps higher priority. 

2) The DB should be on the same machine as Zope


3) The way in which queries are built can cause some problems. You may want to create a query that presort  preselects the results you want to obtain and then use that query as your data source in the Zope SQL Method. That way the results are pre-indexed and return quicker. This provided me a 97% performance improvement. (3 minutes down to 5 seconds) For Example: table-join query sorted by name-ZSQLMethod instead of table-ZSQLMethod (join sort)

4) You may want to run the Access database analysis tool and see if it recommends indexing.


5) You can adjust the number of records returned to improve performance in some cases.
Sorry I'm an NT guy, and I agree 98 is for home user desktops not servers, NT workstation should be the bare minumim at the desktop IMHO. I don't want to get into the third grade OS wars either. It certainly isn't worth it to me to go thru the learning curve to switch to unix. The migration to NTW is much more tranparent.


Alan Capesius, MCSE
Technical Support Engineer
Sysmex Corporation of America
[EMAIL PROTECTED]





Re: [Zope] simple dtml-if question

2000-07-26 Thread Tim Cook

Marcel Preda wrote:

 just:

 dtml-if SerialNumbernbsp;
 dtml-elsedtml-var SerialNumber
 /dtml-if

Actually:
 dtml-if SerialNumber
   dtml-var SerialNumber
 dtml-else
   nbsp
 /dtml-if

The logic got turned upside dowm s.

-- Tim Cook --
FreePM Project Coordinator - http://www.freepm.org
OS Healthcare Alliance Supporter - http://www.oshca.org

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Question

2000-07-26 Thread Chris McDonough

Lionel,

A couple of ground rules first:  please dont post HTML to the list or
post messages marked "importance: high" to the list.

Errr.. after reading your question, I've finally come to grips with the
fact that I have no idea what you're asking.  Sorry!  Please explain
more.




-Original Message-
From: Lionel Tafel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 26, 2000 2:11 PM
To: [EMAIL PROTECTED]
Subject: [Zope] Question
Importance: High


Hy everybody, i have a question?

I need to know if i can change the setting when i create a folder in the
zope. Because i create a folder and automaticly that create a file
index.php3 with some data. I want to know if i can change the data or
setting the data that this index.php3 have into.
 
dtml-var standard_html_header
h2dtml-var title_or_id/h2
p
This is the dtml-var id Document.
/p
dtml-var standard_html_footer

Thank you very much, 

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] simple dtml-if question

2000-07-26 Thread joel grimes


If the SerialNumber is taken from a ZSQL method, shouldn't you been able to 
show it without testing its content.
Such as:
dtml-var SerialNumbernbsp;

Those rows that have something other than 'null' would be shown together 
with a nbsp;.

Well, THAT never occurred to me.  Somethimes the easiest solution is the 
best.

Thanks,

Joel

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] while

2000-07-26 Thread Leichtman, David J


Is there an easy way to simulate the functionality of a while loop in DTML?

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Bill Anderson

Nick Garcia wrote:
 
 Nick Garcia wrote:
 
  Hmmm... I was just trying to get 2.2.0 working with PCGI yesterday and
  couldn't get it working either.  These instructions got it up and
  running, but now I'm seeing something a bit strange and I was wondering
  if you were seeing the same thing.  If I go to a page that doesn't
  exist, I get this error:
 
  Is it just me?
 
 [Answering my own post]
 
 It's not just me, and it only happens when you don't have an index_html
 at the root and you try to access just the domain (try it, it's fun!).
 
 I'll put this in the Collector.


Yes. I had it and I figured it out this am too...
;^)

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Re: Folderish objects and that BASE tag...

2000-07-26 Thread R. David Murray

On Mon, 24 Jul 2000, Chris Withers wrote:
  I belive that it is returning:
  
  http://my.zope/site/file.html/index_html
 
 I wonder what index_html that is then? :S

From lib/python/OFS/Image.py (which also implements generic file object):

def index_html(self, REQUEST, RESPONSE):
"""
The default view of the contents of a File or Image.
 
Returns the contents of the file or image.  Also, sets the
Content-Type HTTP header to the objects content type.
"""


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Python/Tkinter Zope

2000-07-26 Thread Cary O'Brien

 charset="US-ASCII"
 
 Would it make any sense ? Such an application could only run on the server.
 Not exactly the idea of a web-enabled application ?! To use it on a client
 at least Python and TKinter should be installed on the client. This would
 only be feasable in a corporate environment, but then, why still use Zope ?
 I think I do not know what you want with the combination of GUI and Zope.
 

Hmm.  There is jpython, which is a python interpreter written in java, which
I guess can access AWT/Swing classes.  So you could do the GUI that way.  I
don't think there is a tk in java. See www.jpython.org for more. 

There is or was? also a TCL/TK plug-in.  It seems dead now.  I don't know
what the heck is going on with Scriptics.  Ajuba?  Huh?

Or (on a roll now) you could use the X version of Python/TKinter and
remote the display using VNC, or one of the Java X servers.

-- cary

 Gijs
 
  -Oorspronkelijk bericht-
  Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Tim Cook
  Verzonden: woensdag 26 juli 2000 5:03
  Aan: Zope List
  Onderwerp: [Zope] Python/Tkinter  Zope
 
 
  Has anyone used this combination for GUI inside a Zope app?
 
  -- Tim Cook --
  FreePM Project Coordinator - http://www.freepm.org
  OS Healthcare Alliance Supporter - http://www.oshca.org
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  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 )
 
 
 
 
 --__--__--
 


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] problem with manage_permission

2000-07-26 Thread Dieter Maurer

Jerome Alet writes:
  self.manage_permission(permission_to_manage = 
"Access contents information" , roles = [ 'Manager', 'admin' ]) 
  ..., but the manage_permission
  call gives me the following traceback: 
  
  Error Type: AttributeError
  Error Value: aq_acquire
  
  Traceback (innermost last):

File /usr/local/zope/lib/python/OFS/ObjectManager.py, line 173, in
  _subobject_permissions
  AttributeError: (see above)
  
  Surprisingly, if I delete the manage_permission line, restart Zope, re-add
  an instance of MyClass (it works), then try to manually modify the
  permissions using the MyClass instance's security tab, then it works
  flawlessly. 
Inside the constructor code (i.e. inside "__init__"),
objects do not yet have an acquisition context; they
are not yet acquisition wrapped.

This means, they do not yet have any of the acquisition attributes:
aq_acquire, aq_base, aq_self, aq_parent, aq_inner.

When they are later accessed, they are not returned themselves.
Rather, an acquisition wrapped version of the object
is returned. The wrapper provides the attributes above.

"manage_permissions" obviously requires obviously requires its
"self" to be a wrapped object.

If you have access to the correct acquisiton context (i.e.
the folder, where you will instantiate the instance), you
can wrap the object yourself:

self.__of__(context).manage_permissions()

Or you must postpone the "manage_permissions", until
you can reaccess the object in the correct context.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] computed attribute access(was: Re: [Zope] namespace and PARENTS doubt) (was: Re: [Zope] namespace and PARENTS doubt)

2000-07-26 Thread Dieter Maurer

Fabio Akita writes:
   dtml-with "_['PARENTS[1].' + _['parameter'] + '.folder']"
For "computed attribute access", use "_.getattr".

In your case probably (I am not sure, I understand you expression
correctly):

dtml-with "_.getattr(PARENTS[1],parameter).folder"


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] while

2000-07-26 Thread Daniel Rusch

Try:

dtml-in "_.range(1,10)"
 dtml-var sequence-item
/dtml-in

"Leichtman, David J" wrote:

 Is there an easy way to simulate the functionality of a while loop in DTML?

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Who is uid 506?

2000-07-26 Thread Stephen Nosal

Folks - I've installed Zope 2.2 (binary rpm) on my Linux box (suse 6.4) and I notice 
that many files are owned by uid 506.

I don't have a uid 506 on my box. Should I create a zope user with this id? Should I 
ignore it?

- Steve


__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Who is uid 506?

2000-07-26 Thread Chris McDonough

The reason the files are owned by 506 is an artifact of the way the RPM
was packaged.  Either untar and install the source as a "normal" user or
maybe contact the maintainer of the RPM and see if this installation
behavior is intentional (I imagine it is).

 -Original Message-
 From: Gregory Haley [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 26, 2000 5:36 PM
 To: Stephen Nosal
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Who is uid 506?
 
 
 Hi,
 
 Take a look at your /etc/passwd file.  You will notice that 
 system user
 ids are 0 - ?, then there are other user id's, the first 
 actual user is
 assigned uid of 500, for me, 500 is my own user account.  If you add a
 user zope, you can assign it a uid by hand, or it will assign the next
 available uid in the list.
 
 On some systems, though, zope will not run unless it has the owner and
 group set to nobody, which has a uid of 99 -- if your install 
 assigned a
 uid of 506, it might be that this was assigned to someone who 
 built the
 installation you have, but when you uncompressed it, etc, 
 there are not
 enough users in your passwd file so that a user id (name) is actually
 assigned the UID of 506.  I think it would be better to run a command
 such as:
 
 $ chown -R nobody.nobody * in your /opt/zope/ directory.  This will
 recurssively change all the subdirectories and files.  On my localhost
 installation, I actually use nobody.wheel as the owner and 
 group, since
 I am in the wheel group, i can edit the files, but only root 
 can delete
 or screw with the directories.
 
 In a terribly verbose way, don't create a zope user uid of 506, but
 change the owner/group to something that will be secure from crackers
 and other crooks.
 
 HTH.
 
 ciao!
 greg.
 
 
 Stephen Nosal wrote:
  
  Folks - I've installed Zope 2.2 (binary rpm) on my Linux 
 box (suse 6.4) and I notice that many files are owned by uid 506.
  
  I don't have a uid 506 on my box. Should I create a zope 
 user with this id? Should I ignore it?
  
  - Steve
  
  __
  Get your Private, Anti-Spam, Free Email at http://e3mil.com
  and Step into a Friendly Universe!
  
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  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 )
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )
 

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Zope jobs in MA

2000-07-26 Thread Dan L. Pierson

If you're interested in working with Zope in Massachussetts, we're
hiring.  Look on the Zope jobs board for more info: 

http://www.zope.org/Members/plewis/job_board/index_html

Dan Pierson
Chief Technical Officer
Control.com, Inc.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Compiling C souce code

2000-07-26 Thread * Lucky

How can I compile the C source code of SeachIndex.Splitters in order to generate the
Splitters.pyd file ?
__
Boîte aux lettres - Caramail - http://www.caramail.com




Re: [Zope] Compiling C souce code

2000-07-26 Thread Phil Harris

Use a C compiler

- Original Message -
From: * Lucky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 27, 2000 2:11 AM
Subject: [Zope] Compiling C souce code


How can I compile the C source code of SeachIndex.Splitters in order to
generate the
Splitters.pyd file ?
__
Boîte aux lettres - Caramail - http://www.caramail.com




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] while

2000-07-26 Thread Patrick Lewis

This is real ugly, but you asked (untested, but you get the idea):

dtml-try
  dtml-in "_.range(1000)"
dtml-if whileCondition  !-- Your logic test --
  !-- Do stuff in while loop --
dtml-else
  dtml-raise type="conditionFalse"errormsg/dtml-raise
/dtml-if
  /dtml-in
dtml-except conditionFalse
  !-- Fall out of 'while' loop.  --
dtml-else
  dtml-raise type="RangeError"Oops! Exception never raised./dtml-raise
/dtml-try

This only works if the loop will cycle less than 1000 times.  Needless to
say, this is done a lot easier in Python.

On Wed, Jul 26, 2000 at 05:46:18PM -0500, Leichtman, David J wrote:
 
 But that's more like a for loop. No test condition.
 Basically, I want to keep redoing a method until a condition is met.
 
 -Original Message-
 From: Daniel Rusch [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 26, 2000 3:19 PM
 To: Leichtman, David J
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [Zope] while
 
 
 Try:
 
 dtml-in "_.range(1,10)"
  dtml-var sequence-item
 /dtml-in
 
 "Leichtman, David J" wrote:
 
  Is there an easy way to simulate the functionality of a while loop in
 DTML?
 

-- 
Patrick Lewis [EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Silly send mail problem

2000-07-26 Thread wai

Hi all,

I had a sendmail problem, whenever I send out a mail from zope, it always
contain an empty "To" ,"From" and "Subject", but I was able to get the body
of the mail, anyone got this problem before ??

I'm using Zope 2.1.6 on NT and the mail server is from Lotus, and the form
processor syntax as below :

dtml-sendmail
smtphost="mail.xyz.com"
mailto="[EMAIL PROTECTED]"
mailfrom="[EMAIL PROTECTED]"
Subject="Testing from my machine"

mail body
/dtml-sendmail

Thanks.

Cheers

Wai


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: Need for aq_base in DTML (was: Re: [Zope] Dumb DTML question - existance check of an object)

2000-07-26 Thread Satheesh Babu

I made a DTML method which works, but doesn't do it
recursively. I'll try external methods.

Thanks..

dtml-if fname
 dtml-try "_.getitem(_['fname'],1)"
   dtml-with "_.getitem(_['fname'],1)"
dtml-var title
dtml-unless "meta_type=='Folder'"
  Item exists, but not a folder
/dtml-unless
   /dtml-with
 dtml-except
   Folder not found
   dtml-if ftitle
dtml-try
   dtml-call "manage_addFolder(_['fname'],_['ftitle'])"
Folder Created
dtml-except
   Folder could not be created
/dtml-try
   dtml-else
dtml-try
  dtml-call "manage_addFolder(_['fname'],_['fname'])"
   Folder Created
dtml-except
   Folder could not be created
/dtml-try
   /dtml-if
 /dtml-try
/dtml-if fname
- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Satheesh Babu [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 26, 2000 3:27 PM
Subject: Need for "aq_base" in DTML (was: Re: [Zope] Dumb DTML question -
existance check of an object)


 Satheesh Babu writes:
   I have a URL, say, /sub1/sub2. How do I check in DTML
   whether
 1. folder sub1 exists or not
 2. If not, create it.
 3. folder sub2 exists under sub1
 4. If not, create it.
 It is easy, if you are a bit sloppy.

  * Access to "/": "PARENTS[-1]"
  * Existence check: "_.hasattr(object,what)"
  NOTE, that this is the sloppy part.

   - "_.hasattr" will return true, if "object" has
 attribute "what" (that is what we want)
 *OR* when it has acquired such an attribute
 (we do *NOT* want that here).

 What we would need is a DTML accessible version
 of "aq_base". This is trivially handled by
 an external method.

   - it returns true, when there is such an attribute.
 This may not be a folder.

 You can check "meta_type" to see, it is indeed a folder.

  * creation: "manage_addFolder"
  look in the ZDP's (http:zdp.zope.org) object reference
  for the function's signature.

  I think, this info is available in the Zope 2.2 help system, too.


 Dieter



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: [Zope-dev] Need for aq_base in DTML(was: Re: [Zope] Dumb DTMLquestion - existance check of an object)(was: Re: [Zope] Dumb DTMLquestion - existance check of an object)question - existance check of an object)(was: Re: [Zope] Dumb DTML question - existance check of an object)

2000-07-26 Thread Steve Alexander

Dieter Maurer wrote:
 
  * Access to "/": "PARENTS[-1]"
  * Existence check: "_.hasattr(object,what)"
  NOTE, that this is the sloppy part.
 
   - "_.hasattr" will return true, if "object" has
 attribute "what" (that is what we want)
 *OR* when it has acquired such an attribute
 (we do *NOT* want that here).
 
 What we would need is a DTML accessible version
 of "aq_base". This is trivially handled by
 an external method.

Can you do this with the following in DTML?

  dtml-with "PARENTS[-1]" only
dtml-if "_.hasattr(object, what)"
...stuff...
/dtml-if
  /dtml-with

Not tested, but it looks right to me.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope maillist  -  [EMAIL PROTECTED]
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 )