[Zope] Adding a ZClass Instance to a Specific Folder

2000-12-21 Thread Leichtman, David J

The default constructor when a ZClass is created calls:
dtml-with "ZClass_name.createObjectInFolder(REQUEST['id'],REQUEST)"
/dtml-with
And when you programmatically add a ZClass instance, it's like this:
dtml-with "manage_addProducts('Your_product')"
  dtml-call "ZClass_name.ZClass_name_add(_.None,_)"
/dtml-with
This creates the instance in the directory of the method from which the 
call was made.

The Question:
How do you go about adding an instance to a specific folder? I can't, 
for the life of me, figure it out. I've tried many different things, 
and I've looked for flags in createObjectInFolder, but to no avail.



___
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] LocalFS question

2000-12-11 Thread Leichtman, David J


How do you access an individual object in a LocalFS? By that, I mean:

If I wanted the last_mod time of any Zope object, I could say dtml-var
"object.subobject.bobobase_modification_time".
However, if you try to do the same thing with a LocalFS object, i.e.
dtml-var "localfs_object.localfs_subobject.bobobase_modification_time",
you get the error NameError: localfs_subobject
This leads me to believe that LocalFS subobjects are not really objects. But
then how does the Zope management interface deal with them, and how can I?

___
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] image resize

2000-12-08 Thread Leichtman, David J


Is there a way to do a dynamic image resize in Zope? I know PHP has that
ability, and I was hoping that Zope had something similar.
And I'm not talking about height and width atributes in the img tag. I mean
actually creating, on-the-fly, a new duplicate of the image that's a
different size.

___
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] String to Object

2000-11-08 Thread Leichtman, David J


Does anyone now how I might take a string and turn it into an object
reference in DTML?

By that, I mean, I want to take a string like: 'object.subobject.subobject'
from a database,
and I want to reference it as dtml-var object.subobject.subobject.
I think this is a simple, straightforward thing, but I've been wracking my
brain over it.

___
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 stalls indefinitely

2000-10-03 Thread Leichtman, David J


Thought we had a problem of ours fixed, but here it is once again, a month
later.
Zope, every once in a while, will just stall indefinitely. The Zope process
doesn't die, it just hangs.

Everything was fine for a month or so, and now the problem's started again,
about every hour.
We're running 2.1.6 on Solaris with pgsql and the ZPyGre adapter and the
most recent copy of FSSession.

Any thoughts. I've posed this question to a lot of people many times. Now
that it's back, I'm hoping for fresh insight.

___
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] PyGreSQLDA

2000-09-26 Thread Leichtman, David J


Has anyone had significant speed issues using the PyGreSQLDA? It seems like
I'm only getting one DB connection at a time. Is this an issue with the DA,
with Zope, or am I doing something wrong? I have a pgsql db running just
fine, and in Zope I have a connection instantiated at the top level that all
of my ZSQL methods use. Shouldn't it still be able to establish multiple
connections, though? I guess I'm confused as to how it works. Thought I was
using it right, but if I execute a query through Zope it takes a few
milliseconds unhindered. However, if multiple people try to run a query at
the same time, it usually takes a few seconds, as if only one person were
connected at a time.

I'd love elucidation from someone educated on this subject, as I am most
certainly not :)

~ Dave

___
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] strange zope problems of the crashing kind

2000-08-23 Thread Leichtman, David J


Alright Zopers, I'm looking for a hint, a suggestion, just about anything
would help since I can't, for the life of me, figure out what's wrong.

Here's the run-down.
We are running Zope 2.2.0 on Solaris, and we're running it through Apache +
SSL. We're using a PostgreSQL DB with the ZPoPyDA. We are also using
FSSession 0.4.0 for session management.
Previously, we were using Zope 2.1.6, accessing ZServer directly, and using
FSSession 0.3.1.

Here's the problem.
Previously, when we were accessing ZServer directly, Zope would
spontaneously quit. No reason, it would just die. Restarting it would bring
it back up, but minutes, sometimes hours, sometimes days later, it would
spontaneously die again. I asked the list, but no one had had such problems
(except Dieter, but that was an Oracle problem).
So now that we're running it through Apache, we're still, apparently, having
the same problem. What will happen is that every once in a while (more
frequently with more traffic), Zope will hang indefinitely. The only way to
get over it is to restart Zope. So apparently, the ZServer (which I guess
takes requests from the pcgi process), is still going down as before.

The question is, why is this happeneing? Or, more to the point, how can I
figure out why it is happeneing? I looked through the Zope logs and the
Apache logs and found nothing useful. I've been thinking that it might
correspond to a heavy database access. Perhaps there's a problem with the
ZPoPyDA. Or maybe it's FSSession (which, incidently, doesn't seem to be
expiring cookies correctly). Or maybe it's a compatability issue with
Solaris. I really don't kow, and I don't know how to go about finding out.

So any help anybody can give me would be fantastic. If anybody's had any
kind of similar problems, or if anybody has any suggestions, it would be
much appreciated.
I've racked my brains trying to figure it out, and I just can't.

Thanks.

Dave Leichtman
University of Oklahoma

___
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] server dies

2000-07-31 Thread Leichtman, David J


I was wondering if anyone else had experienced this problem: Ever since we
installed the ZPoPy database adapter, the server has been occasionally
crashing, and it gets worse and worse over time. Has anyone else experienced
this problem? We're running Zope through Apache, on a Solaris box, with
PostgreSQL. I'm really curious as to what could be causing this behavior. I
know that that adapter is still in development, but it seems like that would
be non-desirable behavior :) If there is some way that our setup is causing
this, any input would be appreciated. We are also still running the last
stable release of Zope (2.1.6, I think) with plans to upgrade next week.

Thanks.

___
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] working with datetime

2000-07-27 Thread Leichtman, David J


Is there an easy way to increment the month or year of the DateTime object?

Adding a numeric value increments the day. Incrementing the year is easily
doable, but incrementing the month is significantly more difficult. So I'm
just curious if there's a function that will actualy modify the parts of a
DateTime object, or something way that I'm not thinking of to easily
increment the month.

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




[Zope] (no subject)

2000-07-13 Thread Leichtman, David J

I've previously been a Perl programmer. I did a lot of stuff where I would
have multiple links with different options.
Ex.

a href="/path/script.pl/1234"1234/abr
a href="/path/script.pl/2345"2345/abr

Then, in script.pl, I would pick up the extra info on the other side from
$PATH_INFO.

The problem in Zope is that there is no "end" to the address. Serving from
Apache, it knows that the .pl extension is the end of the path. If there's a
'/' and more after it, it will push it to PATH_INFO. So how do you do this
in Zope? Because it's object names instead of paths in the request, how do
you send optional, additional info through the request as above?

I know there has to be a way to easily do this, I just can't figure it out.


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