[Zope-dev] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan

Recent sightings of the use of __bobo_traverse__ in SkinScript gave me hope
of giving users a more useable breadcrumbs trail in the case where I have
nested specialists.

My TaskTemplates specialist is nested inside my RequestTypes specialist.
When I retrieve a dataskin from the RequestTypes specialist I have a tab
that lists TaskTemplates for that RequestType specialist.  Following a link
from the TaskTemplate list takes you to that instance.

Thus results in a url like this:
/RequestTypes/request type instance/Task Templates/task template
instance,
and what I ideally want is:
/RequestTypes/request type instance/task template instance.

I read all the comments about __bobo_traverse__ and created a python method,
"traversal_method" inside the "RequestTypes" specialists.  I must admit that
I don't really understand Zope's traversal machinery yet and would
appreciate some guidance.

My SkinScript for RequestTypes:

WITH SELF COMPUTE __bobo_traverse_=traversal_method

My traversal_method:

ob = getattr(self, name)
if ob is not None:
  return ob
else:
  ob = self.TaskTemplates.getItem(name)
  if ob is not None:
return ob
  raise 'NotFound'

Any help would be greatly appreciated.

Roch


___
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] Specialists and __bobo_traverse__

2001-01-15 Thread Steve Alexander

Roch'e Compaan wrote:

 Recent sightings of the use of __bobo_traverse__ in SkinScript gave me hope
 of giving users a more useable breadcrumbs trail in the case where I have
 nested specialists.
 
 My TaskTemplates specialist is nested inside my RequestTypes specialist.
 When I retrieve a dataskin from the RequestTypes specialist I have a tab
 that lists TaskTemplates for that RequestType specialist.  Following a link
 from the TaskTemplate list takes you to that instance.
 
 Thus results in a url like this:
   /RequestTypes/request type instance/Task Templates/task template
 instance,
 and what I ideally want is:
   /RequestTypes/request type instance/task template instance.
 
 I read all the comments about __bobo_traverse__ and created a python method,
 "traversal_method" inside the "RequestTypes" specialists.  I must admit that
 I don't really understand Zope's traversal machinery yet and would
 appreciate some guidance.

With your code below, and with a concrete example, can you say what you 
want to happen, and what actually does happen?

 My SkinScript for RequestTypes:
 
 WITH SELF COMPUTE __bobo_traverse_=traversal_method

You'll want another underscore in there: __bobo_traverse__

 My traversal_method:
 
 ob = getattr(self, name)
 if ob is not None:
return ob

If ob is not found, you'll get an error raised. You need to have some 
sort of marker for the default value.

marker=[]
ob=getattr(self, name, marker)
if ob is not marker:
   return ob
# continue your method

Of course, you only need one marker in your class. You can do that if 
you implement your method as an external method, or perhaps with a 
default value for an argument on you python method.

Or, you could not worry about creating a new empty list on each request.

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




Re: [Zope-dev] Specialists and __bobo_traverse__

2001-01-15 Thread Chris Withers

Steve Alexander wrote:
 
 If ob is not found, you'll get an error raised. You need to have some
 sort of marker for the default value.

Is there any reason why no-one uses None as a marker?

cheers,

Chris

___
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] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan


 With your code below, and with a concrete example, can you say what you
 want to happen, and what actually does happen?

  Thus results in a url like this:
  /RequestTypes/request type instance/Task Templates/task template
  instance,
  and what I ideally want is:
  /RequestTypes/request type instance/task template instance.

Let's say I have a RequestType called "Evaluation of Product".  For this
request type I create Task Templates called "Record Customer Details" and
"Ship Product to Customer".  If I go to the Request Type "Evaluation of
Product" the url is: path.to.requestypes/evaluation_of_product.  This gives
me the detail of the request type as well as the list of task templates
relating to this request type.  If I now follow the link to the task
template "Record Customer Details", I simply want to click on a url that
says path.to.requesttypes/evaluation_of_product/record_customer_details and
do not explicitly want to go the TaskTemplates with
path.to.requesttypes/evaluation_of_product/TaskTemplates/record_customer_det
ails.

In other words, my traversal_method for the RequestTypes specialist should
first seek the object on it's own rack and if it can not find it is should
ask the nested TaskTemplates specialist for the object.

Roch


___
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] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan


 With your code below, and with a concrete example, can you say what you
 want to happen, and what actually does happen?

In my traversal_method I have one line that simply changes a property on the
specialist to see if the method is actually called but it does not seem like
the traversal_method is called at all.  The skinscript I use (as said in my
previous mail) is:

WITH SELF COMPUTE __bobo_traverse__=traversal_method

Roch


___
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] Z Search Interface/ZCatalog bugs

2001-01-15 Thread Casey Duncan

There is a bug in 2.3.0a2 that prevents you from adding a Z Search
Interface. It is basically a pathing issue to a dtml file that moved.
The following is a patch for Aqueduct.py to temper this issue:

102c102
 dtml_dir=Globals.package_home(globals())
---
 dtml_dir=os.path.join(Globals.package_home(globals()),'dtml')

There is also a bug in the Z Search Interface implementation of
ZCatalog. Basically ZCatalog returns the list of Meta Data fields for
both the searchable arguments and results. This means the search form
created for a ZCatalog will probably not contain the correct fields.
This patch corrects ZCatalog so that it returns its indexes as the
searchable arguments.

448c448
 for name in self._catalog.schema.keys():
---
 for name in self._catalog.indexes.keys():

I will be sumitting these to the collector as well.
-- 
| Casey Duncan
| Kaivo, Inc.
| [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] Z Search Interface/ZCatalog bugs

2001-01-15 Thread Christopher Petrilli

Casey,

Thanks for these... the first one is a new one to me, and I'll look at it
(please still submit it so we can track it).  The second is patched in a
branch that will be merged before the release of b1.

Chris
- Original Message -
From: "Casey Duncan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 15, 2001 10:46 AM
Subject: [Zope-dev] Z Search Interface/ZCatalog bugs


 There is a bug in 2.3.0a2 that prevents you from adding a Z Search
 Interface. It is basically a pathing issue to a dtml file that moved.
 The following is a patch for Aqueduct.py to temper this issue:

 102c102
  dtml_dir=Globals.package_home(globals())
 ---
  dtml_dir=os.path.join(Globals.package_home(globals()),'dtml')

 There is also a bug in the Z Search Interface implementation of
 ZCatalog. Basically ZCatalog returns the list of Meta Data fields for
 both the searchable arguments and results. This means the search form
 created for a ZCatalog will probably not contain the correct fields.
 This patch corrects ZCatalog so that it returns its indexes as the
 searchable arguments.

 448c448
  for name in self._catalog.schema.keys():
 ---
  for name in self._catalog.indexes.keys():

 I will be sumitting these to the collector as well.
 --
 | Casey Duncan
 | Kaivo, Inc.
 | [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 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] New UI for 2.3

2001-01-15 Thread Simon Michael

Simon Michael [EMAIL PROTECTED] writes:
 I think it needs an image content-type ?

Sorry, just my flaky link. For shame, to think such a thing.

My two cents on the screenshot:

- looks like good progress!

- the top bar as shown definitely doesn't make best use of my precious
screen space, should become a user option

- for what it's worth I too spend most of my time in manage_main to
avoid frames confusion

- agree with Andy's point about many shades of blue

- I think the black might grow on me

- stating-the-obvious: a centralized stylesheet and more user
preferences for all management pages would be good

-Simon


___
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] Debugging Zope with Komodo

2001-01-15 Thread Holger Lehmann

Am Donnerstag, 11. Januar 2001 20:10 schrieb Andy McKay:
 Aaron has just helped me get Komodo debugging working for Zope. Both Neil
 and I think this is great, for the first time we can see the
 interaction of Zope internals as they happen (its no longer a black box
 anymore). This shed so much light on Zope, I think its great and so will
 any Zope developer.

 Many thanks to all involved in Komodo for making this happen.
 --
   Andy McKay.


Ok, now you got us up to speed, where is the howto ?

- Holger




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

-- 
---
catWorkX GmbH
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel: +49 (0700) catWorkX
Tel: +49 (40) 890 646-0
Fax: +49 (40) 890 646-66
mailto:[EMAIL PROTECTED]
http://www.catworkx.de
http://www.catbridge.de



___
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] ANN: CoreSessionTracking 0.5 dev release

2001-01-15 Thread Chris McDonough

Howdy folks,

A new development release of the core session tracking implementation (which
allows you to store state between requests for anonymous visitors) is
available at
http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking.  The latest
release is 0.5.

Thanks,

- C



___
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] Massive scalability

2001-01-15 Thread Andy McKay

 I am currently planning two separate 'Archive' type
 projects/Products. In both cases, I need to make sure that
 my implementation will scale to hundreds of thousands or
 even millions of objects.

I would recommend using an RDMBS behind Zope then. Its faster, simpler and I
have always had better results.


___
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] Massive scalability

2001-01-15 Thread Michael Bernstein

Andy McKay wrote:
 
  I am currently planning two separate 'Archive' type
  projects/Products. In both cases, I need to make sure that
  my implementation will scale to hundreds of thousands or
  even millions of objects.
 
 I would recommend using an RDMBS behind Zope then. Its faster, simpler and I
 have always had better results.

While that would work for the simple object case, I find the
prospect of storing a bunch of BLOBs (for the image data of
the Photos) in an RDBMS to be *most* un-appetizing. Storing
them on the server's file-system seems in-elegant as well.

I'd like to build both of these applications as products
that can be easily installed into a Zope server (as easily
as Squishdot). Adding a dependency on an RDBMS or requiring
additional setup on the server's FS seems a step in the
wrong direction.

I'm working with objects here. I prefer to work with them
compared to the approach of decomposing my objects into
RDBMS records or files, and recomposing.

So the question remains: Will either approach (within the
ZODB) allow me to scale the application to hundreds of
thousands (or even millions) of objects indexed in a
ZCatalog?

I should stress that I am far more concerned about the
number of objects than I am about the number of 'hits'.

I know that the ZCatalog/ObjectManager approach used by
Squishdot will scale to over 9,000 objects (the number of
postings to date at technocrat.net), So I'm reasonably
certain that my proposed ZCatalog/BTree Folder approach will
be at least as scalable. I'm slightly less confident about
the Specialist/Rack approach, because I don't know of any
sites that have used them to store that many objects in the
ZODB, but only slightly.

However, so far I have not heard of anyone storing and
indexing as many homogenous objects as I am talking about.
I'd really like to hear from anyone who has attempted to do
this or something similar.

Does anyone know of any hidden 'gotchas' when dealing with
this many objects, regardless of the hit-load on the system?

Thanks,

Michael Bernstein.

___
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] Massive scalability

2001-01-15 Thread Jimmie Houchin

I would like to echo Michael's sentiment and comments. I am at the
beginning stage of Zope development of a website which will have
millions of objects of a single object type and multiple of such. I
currently plan on using mounted databases for the various object
repositories and am currently exploring the best means to implement
such. I know of the mountedfilestorage product by Anthony, but with the
massive refactoring happening for 2.3 I am watching the horizon for how
such will be implemented in the future.

I think there are many who would like to keep their development within
Zope using objects. Any information on best use or development
strategies for such setups would be greatly appreciated. 

Thanks,

Jimmie Houchin


Michael Bernstein wrote:
 
 Andy McKay wrote:
 
   I am currently planning two separate 'Archive' type
   projects/Products. In both cases, I need to make sure that
   my implementation will scale to hundreds of thousands or
   even millions of objects.
 
  I would recommend using an RDMBS behind Zope then. Its faster, simpler and I
  have always had better results.
 
 While that would work for the simple object case, I find the
 prospect of storing a bunch of BLOBs (for the image data of
 the Photos) in an RDBMS to be *most* un-appetizing. Storing
 them on the server's file-system seems in-elegant as well.
 
 I'd like to build both of these applications as products
 that can be easily installed into a Zope server (as easily
 as Squishdot). Adding a dependency on an RDBMS or requiring
 additional setup on the server's FS seems a step in the
 wrong direction.
 
 I'm working with objects here. I prefer to work with them
 compared to the approach of decomposing my objects into
 RDBMS records or files, and recomposing.
 
 So the question remains: Will either approach (within the
 ZODB) allow me to scale the application to hundreds of
 thousands (or even millions) of objects indexed in a
 ZCatalog?
 
 I should stress that I am far more concerned about the
 number of objects than I am about the number of 'hits'.
 
 I know that the ZCatalog/ObjectManager approach used by
 Squishdot will scale to over 9,000 objects (the number of
 postings to date at technocrat.net), So I'm reasonably
 certain that my proposed ZCatalog/BTree Folder approach will
 be at least as scalable. I'm slightly less confident about
 the Specialist/Rack approach, because I don't know of any
 sites that have used them to store that many objects in the
 ZODB, but only slightly.
 
 However, so far I have not heard of anyone storing and
 indexing as many homogenous objects as I am talking about.
 I'd really like to hear from anyone who has attempted to do
 this or something similar.
 
 Does anyone know of any hidden 'gotchas' when dealing with
 this many objects, regardless of the hit-load on the system?
 
 Thanks,
 
 Michael Bernstein.

___
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] Massive scalability

2001-01-15 Thread Michael Bernstein

Jimmie Houchin wrote:
 
 I would like to echo Michael's sentiment and comments. I am at the
 beginning stage of Zope development of a website which will have
 millions of objects of a single object type and multiple of such.

are your objects intended to be indexed by ZCatalog as well,
or are you planning some other method of finding your
objects?

 [snip stuff about mounted databases]
 
 I think there are many who would like to keep their development within
 Zope using objects. Any information on best use or development
 strategies for such setups would be greatly appreciated.

Thanks for adding your voice!

I also think that applications such as we're discussing
should be possible to deploy using nothing but Zope's built
in capabilities. I understand that Zope has certain
limitations in situations that require many writes to the
database, and I accept those limiattions as being a
neccessary trade-off for a storage strategy that uses an
appending file format. I am still trying to determine if
Zope (especially using the two development options I
outlined) has any built in limitations regarding the number
(or number x size) of objects stored.

I really appreciate Zope's features (especially with
ZPatterns) that allow applications to be developed that are
storage-agnostic, and I feel that this is especially useful
for tying into existing legacy systems, but I don't want to
develop a new application, storing new data, that is tied to
a specific storage methodology such as an RDBMS.

People who wish to customize an application to leverage
their existing legacy data should be free to do so, but I've
noticed that Zope products that have some external system as
a pre-requisite (Worldpilot, ZCommerce, etc.) are deployed
far less often than those which do not (Squishdot, Zwiki,
etc.).

So, again: Has anyone run up against any performance or
other limitations regarding large numbers (hundreds of
thousands or more) of objects stored within the ZODB either
in a BTree Folder or a Rack?

In other words, will the system slow down if you add enough
objects?

Thanks,

Michael Bernstein.

___
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] Calling other frames

2001-01-15 Thread Martijn Pieters

On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
 First of all, I don't think you can achieve that with javascript. As far as I know,
 neither IE nor Netscape allows javascript to access DOM objects of other frame page 
for
 security reasons.

This restriction only applies when the two frames come from different
domains. Alll URLs from the same webserver can access DOM trees in other
frames from the same server. This is how Zope updates the left-hand tree
in the management interface when you add a Folder, for instance.

For an example of updating navigation buttons across frames see
http://www.tunix.nl/'. Ignore the Dutch, just choose an option on the main
page, then use the top and left navigation buttons to go around a website.
Then use your browser's back and forward buttons to see the left and top
menus follow the current page. Also, when clicking on a link in the
content pane, the navigation menus will update. All JavaScript source
comments are in english, that's they way I worked.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.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] hasRole bug or feature in 2.2.?

2001-01-15 Thread Chris Withers

Chris McDonough wrote:
 
 I'll trust that you're right, Dieter, because reading the traversal
 machinery code makes my head hurt.  :-)

Likewise... I'm sure that's not a good thing ;-)

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 )




[Zope] How do I authenticate through pcgi and win2000 ????

2001-01-15 Thread Max Møller Rasmussen

I have installed zope on port 8080 on a win 2K machine.

It runs nicely, but due to firewalls and other reasons it has to run on port
80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.

But when I try to use a manage page I cannot log in without being a member
of the win2K domain, and that is not feasible in this case. I have tried all
setting, I think.

Is there any way to do it?

Should I make my own authentication page so users can log on through a form?
If so how is this done?

Regards Max M

___
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] OpenBSD 2.8 woes

2001-01-15 Thread Jan Muenther

Hello,


  Could anybody enlighten me??? I don't know Python (yet), so the
  tracebacks are not too informative for me ...
 
 Are you using Python 2.0?  It's not yet compatible with Zope, though
 efforts are being made. Just enter "python" to find out.


No, I'm not. At first I tried to take the version that comes
shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
threads compiled in (at least that's what the package name
suggests). 
When that didn't work, I pkg_deleted the package and then
downloaded the 1.52 as noted in the Zope specs, compiled and
installed it - it seemed to run, but Zope cr***ed out with a
python.core after trying to access the management screen. The
machine itself definitely is okay, techwise. The python
compilation and installation didn't show any errors. The OpenBSD
installation is totally virgin otherwise. 

I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-| 
Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
be really curious what steps you followed to get it to work.-

Cheers, Jan 
-- 
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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 )




Re: [Zope] Calling other frames

2001-01-15 Thread Steve Spicklemire


I think probably Javascript is the 'cleanest' solution in this case,
but depending on the complexity of your UI another non-JS approach is
to make every link target the topmost frome (e.g., target="_top") and
redraw all frames in the frameset on each 'click'. This way you know
that all frames reflect the latest situation, but it can be annoying
to see the whole browser redraw every time you do anything. However, 
if your browser doesn't *do* Javascript (so long as it does do
frames hmm.. how likely is that?) then it would at least work 

-steve

 "Martijn" == Martijn Pieters [EMAIL PROTECTED] writes:

Martijn On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
 First of all, I don't think you can achieve that with
 javascript. As far as I know, neither IE nor Netscape allows
 javascript to access DOM objects of other frame page for
 security reasons.

Martijn This restriction only applies when the two frames come
Martijn from different domains. Alll URLs from the same webserver
Martijn can access DOM trees in other frames from the same
Martijn server. This is how Zope updates the left-hand tree in
Martijn the management interface when you add a Folder, for
Martijn instance.

Martijn For an example of updating navigation buttons across
Martijn frames see http://www.tunix.nl/'. Ignore the Dutch, just
Martijn choose an option on the main page, then use the top and
Martijn left navigation buttons to go around a website.  Then use
Martijn your browser's back and forward buttons to see the left
Martijn and top menus follow the current page. Also, when
Martijn clicking on a link in the content pane, the navigation
Martijn menus will update. All JavaScript source comments are in
Martijn english, that's they way I worked.

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

Martijn ___ Zope
Martijn maillist - [EMAIL PROTECTED]
Martijn http://lists.zope.org/mailman/listinfo/zope ** No cross
Martijn posts or HTML encoding!  ** (Related lists -
Martijn http://lists.zope.org/mailman/listinfo/zope-announce
Martijn 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: ZMySQLDA and aggregate functions on Win

2001-01-15 Thread Markus Kemmerling

Thank you Dave for your answer. But what do you mean by you don't expect a SELECT 
returning a number to work?
The error you got clearly is a mysql syntax error: If I have a table 'shop' and make a 
SELECT on 'show' I really wouldn't expect that to work ;-)
But I don't get any mysql error, I get a python error.

Let me repeat my problem and try to be a little bit more precise (I use your example):

SELECT COUNT(*) FROM show GROUP BY article;

works from the mysql command line, works from within Zope on linux, but breaks from 
within zope on windows. SELECT COUNT(*) FROM show; works from within Zope on windows, 
too.

So the problem is to have a SELECT with COUNT() and GROUP BY-clause from within Zope 
on Windows. Since it works on the mysql command line, it is definitely not an SQL 
error.

I use Zope 2.2.4, mysql 3.23gamma, ZMySQLDA 1.1.3 and the libmySQL.dll linked from the 
HowTo explaining the installation of ZMySQLDA on Win32.

The error I get is of type 'KeyError' with value 'unhandeld' and occurs on line 191 of 
ZMySQLDA's db.py. This and the next lines read as follows:

for d in desc:
item={'name': d[0],
  'type': defs[d[2]],
  'width': d[3],
   }
func(item)

where 'desc' is the fieldlist of the result set returnded by the query and 'defs' is 
some kind of type-mapping defined at the top of db.py, that I don't really understand:

defs={
"short": "i", "long": "i", "char": "s", "double": "n", "decimal": "n",
"float": "n", "tiny blob": "t", "medium blob": "t", "long blob": "t",
"blob": "t", "date": "d", "time": "s", "datetime": "d",
"timestamp": "d", "varchar": "t", "string": "t",
}

The following little ugly hack makes my query work:

for d in desc:
try:
item={'name': d[0],
  'type': defs[d[2]],
  'width': d[3],
   }
func(item)
except KeyError:
item={'name': d[0],
  'type': 'i',
  'width': d[3],
   }
func(item)

So it seems to me that COUNT returns some field-type unknown to 'defs'. (What still 
confuses me is, that this only happens in combination with a GROUP BY-clause.)

I wonder what's the value of d[2] for the COUNT()-column, but since I am quite new to 
python and Zope I still don't know how to debug.

I also wonder if anybody running Zope with mysql on windows can reproduce this error. 
Or maybe someone with a good knowledge of ZMySQLDA and the python mysql-module has 
some hint?

Sorry that this message got so long ...

Markus Kemmerling

 This is curious to me - I tried this on my Linux platform from 
 mysql and it
 doesn't work.
 Perhaps I misunderstand what you are trying to do:
 
 SELECT COUNT(*) FROM mytable - returns a number - so I really don't expect
 it to work.
 
 I have a table - shop and a column in that table - article:
 
 mysql select count(*) from show group by article;
 ERROR 1064: You have an error in your SQL syntax near 'show group by
 article' at line 1
 
 Sorry if I misunderstand what you are trying to do -
 
 =
 Dave Woolston   [EMAIL PROTECTED]
 Digital Creations  www.digicool.com
 (716) 262-4715
 
 
  I have a problem with ZMySQLDA and aggregate functions in 
 combination with
  grouping on Windows.
  When I say:
SELECT COUNT(*) FROM mytable GROUP BY myfield;
  I get an KeyError 'Unhandeld'.
 
 SELECT COUNT(*) FROM mytable;
  works fine, so does
SELECT myfield FROM mytable GROUP BY myfield;
  but not the combination of both.
  Also on a linux machine the error doesn't occur. Of course I tested the
  queries from the mysql command line.
 
  Any help?
 
  Markus Kemmerling
 
 


___
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] Design Q: Product vs. External Methods

2001-01-15 Thread tilo . schwarz

Hi Zope-Experts,

one question concerning design using zope:

Assume, I have a bunch of python modules / scripts, which I want to make 
accessible via zope. Is it better to use the external methods to bring the 
python modules into zope or should I make a Product out of my python modules.

I also would like to know, if it is possible to update a bunch of external 
method zope objects simultaneously, or do I have to click 'edit' on every 
single external method object after editing the corresponding python method? 
This would be a bit tedious with 30 or more external methods...

Thanks a lot for any hints!

Tilo

___
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] OpenBSD 2.8 woes

2001-01-15 Thread Luke Tymowski

Hello Jan:

 I don't really know what else I could do. Right now it looks
 pretty much as if I'm going to switch to FreeBSD, my second
 favourite :-| 
 Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
 be really curious what steps you followed to get it to work.-

You will have to use FreeBSD or use OpenBSD 2.7.

2.8 will not work because there is a bug in the threading library 
included with OpenBSD 2.8. Zope triggers it when you call the management 
screen.

However, in the Zope code for the management screens there are 
"thread-safe" calls used which are not, as far as I know, used elsewhere 
in Zope. Maybe there is a bug in that code?

But for now I believe the bug to be in OpenBSD 2.8. I have not found 
anything to suggest that it has been fixed or looked at. None of the 
patches released so far for 2.8 mention it.

I went through this in early December.

Luke


___
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] ZMySQLDA returns truncated/corrupted data?

2001-01-15 Thread aasmund


I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
ZMySQLDA v2.0.1.

The install appears to be successfull, the Products appear in the Control
Panel, I can add, and open a database connection.

However, when I issue the following query:

SHOW TABLES;

I receive the following set:

Tables in la_eksempel

a

(la_eksempel the name of the database, naturally)

There is no table named 'a', however there is a table named "artikkel". If
I try to browse the database, I get a tree with 5 first-level nodes, all
named with the first letter of a table in my database.

If I try "SELECT * FROM ARTIKKEL;", I get 

Error Type: TypeError
Error Value: len() of unsized object

With the following traceback:


Traceback (innermost last):
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: RoleManager)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Connection.py,
line 204, in manage_test
(Object: RoleManager)
  File
/home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: string)
  File /home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_In.py,
line 605, in renderwb
(Object: db)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Results.py,
line 174, in __getitem__
TypeError: (see above)



Has anybody else experienced this?



___
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] Calling other frames (OT)

2001-01-15 Thread Oliver Bleutgen


 I think probably Javascript is the 'cleanest' solution in this case,
 but depending on the complexity of your UI another non-JS approach is
 to make every link target the topmost frome (e.g., target="_top") and
 redraw all frames in the frameset on each 'click'. This way you know
 that all frames reflect the latest situation, but it can be annoying
 to see the whole browser redraw every time you do anything. However,
 if your browser doesn't *do* Javascript (so long as it does do
 frames hmm.. how likely is that?) then it would at least work

There' s always the possibility that people disable javascript - 
and checking for instance http://www.guninski.com/browsers.html
I would say they have reason to do so.

My take is that one should at least provide a non-javascript alternative 
to browse the site. This also helps with search-engines

cheers,
oliver



___
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-posted - How to delete users in Membership product with Persistent User Source

2001-01-15 Thread Kamon Ayeva


Hi,

Has anyone been able to use the delUserForm to delete
users added within a PersistentUserSource in the
PortalMembershipSystem object ?

I am not sure if this piece of code in delUserForm
preceding the HTML form snippet does the right job:

dtml-let idList="[]"
dtml-in "UserSource.getPersistentItemIDs()" sort
dtml-call
"idList.append(getItem(_['sequence-item']))"
/dtml-in

dtml-in idList sort=Importance reverse
...

I can view the users but when I click on the form
button to delete some users, I get

I get 

Error Type: NotFound
Error Value: None

In the view I get, the user url points to
.../acl_users/userid (for example /acl_users/david)
and cannot be used to check the user object.

Thanks for any usefull answer.

Regards,
Kamon





__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.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] Design Q: Product vs. External Methods

2001-01-15 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 
 Assume, I have a bunch of python modules / scripts, which I want to make
 accessible via zope. Is it better to use the external methods to bring the
 python modules into zope or should I make a Product out of my python modules.

Well, do the python modules contain methods or classes?
If classes, turn them into a Zope products.
IF methods, then use them as external methods.

 I also would like to know, if it is possible to update a bunch of external
 method zope objects simultaneously, or do I have to click 'edit' on every
 single external method object after editing the corresponding python method?
 This would be a bit tedious with 30 or more external methods...

Yeah, that is a pain, despite assurances that you shouldn't need to do
that :-S
probably the quickest way would just be to restart the Zope server...

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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Hi, Tim

You do not need to mess with the Python Script bindings.  It looks like
you are trying to get URL:

www.isd197.k12.mn.us/hr/jobs/postings/1234/editJobAction(REQUEST)

Which of course does not exist.  I would change your form action="..
line to 

form action="editJobAction" method="post"

assuming the DTML Method that has the form is called editJobAction. 
Don't worry about passing REQUEST there; Zope takes care of that.

-- Jim Washington

Timothy Wilson wrote:
 
 This seems to almost work. :-)
 
 On Sun, 14 Jan 2001, Jim Washington wrote:
 
  !dtml-var standard_html_header
 
  !dtml-if "REQUEST.form.has_key('editCD')"
  !  dtml-call "manage_changeCDProperties(REQUEST)"
  !  pfont color="red"Your changes have been saved/font/p
  !/dtml-if
 
  !form action="replace_this_with_id_of_this_method"
   table border="0"
 
   trthTitle/th
tdinput type="text" name="title" value="dtml-var title"/td
   /tr
 
   trthArtist/th
 tdinput type="text" name="artist" value="dtml-var artist"/td
   /tr
 
   trtd
  ! input type="submit" name="editCD" value=" Submit Edits "
   /td/tr
   /table
   /form
  !dtml-var standard_html_footer
 
 That's quite clever. I wouldn't have thought of doing it that way.
 
 After translating the CD example to my own ZClass, I get the following error
 after hitting "Submit Edits" on the edit form:
 
 h2Zope Error/h2
 pZope has encountered an error while publishing this resource.
   /p
 pstrongResource not found/strong/p
 Sorry, the requested Zope resource does not exist.pCheck the URL and try
 again.p
 !--
 http://www.isd197.k12.mn.us/hr/jobs/postings/1234/editJobAction%28REQUEST%29
 --
 
 and the traceback:
 
 Traceback (innermost last):
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
 zpublisher_exception_hook
 (Object: Traversable)
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 162, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/BaseRequest.py, line 369,
 in traverse
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/HTTPResponse.py, line
 528, in notFoundError
 NotFound: (see above)
 
 It looks like REQUEST isn't getting passed correctly. I've got REQUEST
 listed as a parameter for my PythonScript. I don't need to mess with
 bindings do 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 )




Re: [Zope] Design Q: Product vs. External Methods

2001-01-15 Thread Jens Vagelpohl

if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
all external methods are re-read every time you access them.

jens



on 1/15/01 6:04, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:

 I also would like to know, if it is possible to update a bunch of external
 method zope objects simultaneously, or do I have to click 'edit' on every
 single external method object after editing the corresponding python method? 


___
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] Design Q: Product vs. External Methods

2001-01-15 Thread Chris Withers

Jens Vagelpohl wrote:
 
 if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
 all external methods are re-read every time you access them.
 
 jens

That hasn't been my experience, but maybe I'm mistaken :-S

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] OpenBSD 2.8 woes

2001-01-15 Thread Ragnar Beer

Seems you already found out what's wrong. Why didn't you post 
anything on the OBSD misc list so that they can fix it?

Ragnar


Hello Jan:

I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-| Has anyone got Zope 2.2.5 running under OpenBSD 
2.8??? If so, I'd
be really curious what steps you followed to get it to work.-

You will have to use FreeBSD or use OpenBSD 2.7.

2.8 will not work because there is a bug in the threading library 
included with OpenBSD 2.8. Zope triggers it when you call the 
management screen.

However, in the Zope code for the management screens there are 
"thread-safe" calls used which are not, as far as I know, used 
elsewhere in Zope. Maybe there is a bug in that code?

But for now I believe the bug to be in OpenBSD 2.8. I have not found 
anything to suggest that it has been fixed or looked at. None of the 
patches released so far for 2.8 mention it.

I went through this in early December.

Luke


___
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] OpenBSD 2.8 woes

2001-01-15 Thread Ragnar Beer

Whereas I couldn't reproduce the error in a prior thread this time I 
can. On my OBSD 2.8 machine running python 1.52 -with-thread CPU load 
goes up to 99% when I try to access the management screens. There was 
a discussion on the OBSD ports list to create a 1.52 port. Did you 
check whether there is and whether that's solving the problem?

Ragnar

Hello,


   Could anybody enlighten me??? I don't know Python (yet), so the
   tracebacks are not too informative for me ...

  Are you using Python 2.0?  It's not yet compatible with Zope, though
  efforts are being made. Just enter "python" to find out.


No, I'm not. At first I tried to take the version that comes
shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
threads compiled in (at least that's what the package name
suggests).
When that didn't work, I pkg_deleted the package and then
downloaded the 1.52 as noted in the Zope specs, compiled and
installed it - it seemed to run, but Zope cr***ed out with a
python.core after trying to access the management screen. The
machine itself definitely is okay, techwise. The python
compilation and installation didn't show any errors. The OpenBSD
installation is totally virgin otherwise.

I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-|
Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
be really curious what steps you followed to get it to work.-

Cheers, Jan
--
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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 )




[Zope] Re: MySQLDA and MySQL-python - patch needed?

2001-01-15 Thread paul_s_johnson


Brian,

I finally got it working. Here's what I did:

I uninstalled all of ZMySQLDA and MySQL-python (formerly MySQLdb - this
name change didn't help any although in the big picture it probably needed
to be done) deleting any trace of it. I then followed all the directions
starting from here:

http://www.zope.org/Members/adustman/MySQLdb - This is the MySQL-python
module.

I used the version of ZMySQLDA that Andy Dustman points to here (there's
more than one floating about and I may have latched onto a
MySQL-python-incompatible one at some point):

http://www.zope.org/Members/adustman/ZMySQLDA - installing this is just of
matter of untarring in the correct Zope directory.

To install MySQL-python I followed the directions that Andy lays out in his
README.txt.  It required that I had to install the rpms mysql-devel and
python-devel which I tracked down at http://rpmfind.net for my flavor of
Linux (RedHat) and MySQL (3.22.32). Once these were installed I was able to
build it exactly as Andy stipulates.

Being a Linux/Zope newbie this seemed daunting but it was more painless
that I originally anticipated.

With these installed I was then getting the error "_mysql module not found"
(or something like that). The python of Zope was not finding the modules I
just built from my main system python. I changed my Zope start-up script
appending the PYTHONPATH variable to include the path where the module
installed to. I added these lines:

PYTHONPATH=$PYTHONPATH:/usr/lib/python1.5/site-packages
export PYTHONPATH

BINGO everything then worked.

Hope that helps.

My hunch is that there is some version incompatibilities going on between
MySQL-python and ZMySQLDA that prevent MySQL query results from returning
to Zope.

BTW, thanks to everyone that responded to my emails for help. Even though
none of them was the exact answer I needed they all supplied some missing
critical piece of the puzzle. Opensource is a cool thing, but none of it
would amount to much without lists like this to help folks out.  Keep it
coming.

-PSJ

Hello All,

I have the exact same problem.  I am running slack 7.1 and I have
installed all of the goodies (i.e. zope, python, mysql, etc.) from
the source code.  After finally figuring out that my /etc/ld.so.conf
was not seeing the mysqlclient libraries i was able to compile
MySQLdb-python modules and ZMySQLDA says that it is installed
properly.  But I have the same issues with the SELECT queries
returning no data (There was no data matching this test_sql query. )
That is straight from Zope.  When I INSERT data to my columns in the
table it works fine though.  I have verified this from the console.
Please advise if there are any suggestions.  Thanks.

Brian L Gautreau


___
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] Design Q: Product vs. External Methods

2001-01-15 Thread Oleg Broytmann

On Mon, 15 Jan 2001, Chris Withers wrote:
  if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
  all external methods are re-read every time you access them.
 
 That hasn't been my experience, but maybe I'm mistaken :-S

   I can assure it is. I run zope.net.ru in debug mode, and did debugging
of an External Method that draw the left column. After I modified the
source file Zope reread it, sure.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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] Design Q: Product vs. External Methods

2001-01-15 Thread Chris Withers

Oleg Broytmann wrote:
 
 On Mon, 15 Jan 2001, Chris Withers wrote:
   if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
   all external methods are re-read every time you access them.
  
  That hasn't been my experience, but maybe I'm mistaken :-S
 
I can assure it is. I run zope.net.ru in debug mode, and did debugging
 of an External Method that draw the left column. After I modified the
 source file Zope reread it, sure.

Fair enough then :-)

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] Calling other frames (OT)

2001-01-15 Thread Martijn Pieters

On Mon, Jan 15, 2001 at 12:51:01PM +0100, Oliver Bleutgen wrote:
  I think probably Javascript is the 'cleanest' solution in this case,
  but depending on the complexity of your UI another non-JS approach is
  to make every link target the topmost frome (e.g., target="_top") and
  redraw all frames in the frameset on each 'click'. This way you know
  that all frames reflect the latest situation, but it can be annoying
  to see the whole browser redraw every time you do anything. However,
  if your browser doesn't *do* Javascript (so long as it does do
  frames hmm.. how likely is that?) then it would at least work
 
 There' s always the possibility that people disable javascript - 
 and checking for instance http://www.guninski.com/browsers.html
 I would say they have reason to do so.
 
 My take is that one should at least provide a non-javascript alternative 
 to browse the site. This also helps with search-engines

The site I pointed to uses JavaScript to highlight your current position
in the site, by swapping images. The cross-frame js code is used to keep
the highlighting in sync with the content frame, even when using
hyperlinks that take you to a idfferent section of the site, or when you
are using your browsers history function.

When a visitor with JavaScript switched off visits the site, navigation
still works. Only the highlighting will cease to support visitors in
keeping tab on where in the site they are.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.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] mysql connection string

2001-01-15 Thread Olaf Zanger

hi there,

two times trouble

first:
right now my setup uses a connection string "db root" which doesn't seam
to give a lot of savety :-). 
at my provider i have a login, but sure no root access to the db. 
* how does the connection string look for user name "peter-hauser" and
password "test3-.2"?
* has the user to be set up in "linux" ?
* how is the setup made in "mysql"?
i tried with "grant all privileges on *.* to "peter-hauser"@localhost;"
and "set password for "peter-hauser"=password('test3-.2');"
but wasn't successful.
* has zope to be run by user "peter-hauser"?

second?
to set up a 3-tier application i should know how to connect mysql
through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.

* i can browse from the zope server to the db-server "pit" and otherway
round with the names "pit" and "pitechon", so "hosts" file should be
correct. 

* how has the connection string to look like?
i tried "db@pit 'peter-hauser'" but it didn't work?
* has mysql to be started with an special flag to open a port?
* does it work with the ip-number?

thanks for help 
olaf


-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com

begin:vcard 
n:Zanger;Olaf Marc
tel;cell:+41-76-572 9782
tel;work:+41-31-332 9782
x-mozilla-html:FALSE
url:www.soli-con.com
org:soli-con Engineering Zanger
adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
title:Dipl.-Ing.
note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A
x-mozilla-cpt:;-32176
fn:Olaf Zanger
end:vcard



RE: [Zope] Design Q: Product vs. External Methods

2001-01-15 Thread Max Møller Rasmussen

From: Oleg Broytmann [mailto:[EMAIL PROTECTED]]

   I can assure it is. I run zope.net.ru in debug mode, and did debugging
of an External Method that draw the left column. After I modified the
source file Zope reread it, sure.

I have never had problems with that either. It autorefreshes nicely.

regards Max M

___
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] mysql connection string

2001-01-15 Thread Oleg Broytmann

On Mon, 15 Jan 2001, Olaf Zanger wrote:
 right now my setup uses a connection string "db root" which doesn't seam
 to give a lot of savety :-).
 at my provider i have a login, but sure no root access to the db.
 * how does the connection string look for user name "peter-hauser" and
 password "test3-.2"?

   [EMAIL PROTECTED] peter-hauser test3-.2 --\
|
 * has the user to be set up in "linux" ?  |
|
   No, only in mysql.   |
|
 * how is the setup made in "mysql"?   |
|
   GRANT select,insert,update,delete,create,alter,drop,index|
ON db.* TO [EMAIL PROTECTED] INDENTIFIED BY 'test3-.2';|
|
 * has zope to be run by user "peter-hauser"?  |
|
   No, you pass peter-hauser in the connection string -/

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Timothy Wilson

Jim (or anyone else who's feeling charitable this morning),

Thanks for all your help. I really appreciate it. I wonder if you'd have
time to look one more time at the two methods I've got that aren't
working. I've included the actual code for my job posting product. Perhaps
someone will find it instructive. I have a feeling that the remaining
problem is not directly related to the processing of the form by the
PythonScript. I also included the traceback at the end of this message.

Here are the two methods. I have a table that displays the currently
available jobs and displays two little icons which call the edit or delete
methods on the corresponding instance of the 'Job Posting' class. The edit
icon links to the 'editJobForm' method which in turn calls the
'editFormAction' method that actually processing the change.

--
editJobForm
-

dtml-var standard_html_header

h2Edit a Job Board Entry/h2
pThis form allows you to make changes to current postings on the online
job board. You don't needed to fill in every 
field on the form. Click on the "Submit Edits" button at the bottom of the
screen to save your changes to the database./p

dtml-if "REQUEST.form.has_key('editJob')"
dtml-call "editFormAction(REQUEST)"
pfont color="red"Your changes have been saved/font/p
/dtml-if

form action="editJobForm"
table border="0"

trthNotes/th
tdtextarea name="notes:text" rows="10" cols="60" wrap="virtual"dtml-var
notes/textarea/td
/tr
trthJob ID/th
tdinput type="text" name="id" size="20" value="dtml-var id"/td
/tr
trthOrganization/th
tdinput type="text" name="organization" size="60" value="dtml-var
org_name"/td
/tr
trthPosition/th
tdinput type="text" name="position" size="60" value="dtml-var
name"/td
/tr
trthDescription/th
tdtextarea
name="description:text" rows="10" cols="60" wrap="virtual"dtml-var
description/textarea/td
/tr
trthPay Offered/th
tdinput type="text" name="pay" size="60" value="dtml-var pay"/td
/tr
trthLine of Authority/th
tdinput type="text" name="loa" size="60" value="dtml-var loa"/td
/tr
trthFunction/th
tdtextarea
name="function:text" rows="4" cols="60" wrap="virtual"dtml-var
function/textarea/td
/tr
trthQualifications/th
tdtextarea
name="qualifications:text" rows="8" cols="60" wrap="virtual"dtml-var
qualifications/textarea/td
/tr
tr
td colspan=2
pTo create a bullet list of "duties," type each one in the box below and
press the "ENTER" key 
between each item in the list./p
/td
/tr
trthDuties/th
dtml-if duties
tdtextarea name="duties:list" rows="10" cols="60" wrap="virtual"dtml-in
dutiesdtml-let item=sequence-itemdtml-if item
dtml-var item
/dtml-if/dtml-let/dtml-in/textarea/td
dtml-else
tdtextarea
name="duties:list" rows="10" cols="60" wrap="virtual"/textarea/td
/dtml-if
/tr
trthOffer Expires/th
tdinput type="text" name="expires" size="20" value="dtml-var
offer_expires fmt="%m/%d/%Y""/td
/tr
tr
td colspan=2pEnter the date that the job was officially posted./p/td
/tr
trthPosted Date/th
tdinput type="text" name="posted" size="20" value="dtml-var date_posted
fmt="%m/%d/%Y""/td
/tr
tr
tdnbsp;/td
td
input type="submit" name="editJob" value=" Submit Edits "
/form
form action="admin_html"
input type="submit" value=" Cancel "
/form
/td
/tr
/table

dtml-var standard_html_footer

-
editFormAction (with REQUEST as a parameter)
-

container.propertysheets['job_info'].manage_changeProperties(REQUEST)


The error I get is:

 Error Type: TypeError
Error Value: sequence index must be integer

Traceback:

Traceback (innermost last):
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
__call__
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
336, in eval
(Object: editFormAction(REQUEST))
(Info: REQUEST)
  File lt;stringgt;, line 0, in ?
  File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
325, in __call__
(Object: editFormAction)
  File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
354, in _bindAndExec
(Object: editFormAction)
  File
/var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
line 321, in _exec
(Object: editFormAction)
(Info: ({'script': lt;PythonScript instance at 8826790gt;,

[Zope] How to get python error output? (PIL)

2001-01-15 Thread tilo . schwarz

Hi Zopians out there,

thanks for helping me with my last question - here is a new one ;-)

We do image-processing of traffic-video-sequences and I'd like to serve 
thumbnails use the following code (originally from some HOW-TO) as external 
method:

import os, os.path, Image

def get_image(self, imagename, thumb, REQUEST, RESPONSE):
"""
Read and return an external file with appropriate response set.

Returns the contents of the file or image.  Also, sets the
Content-Type HTTP header to the objects content type.
"""
thumbname = os.path.join('/tmp', 'thumbs', imagename)
imagename = os.path.join('/tmp', 'images', imagename)
print 'i:', imagename
print 't:', thumbname
if not os.path.exists(imagename):
return ""
if thumb == '1':
print 'inner'
if not os.path.exists(thumbname):
print 'inner2'
#img = Image.open(imagename) -- if I remove the comment, the 
'inner2' is still printed, but the 'after open' in the next line is not printed 
in the logfile anymore
print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'
imagename = thumbname
fptr=open(imagename, "rb")
data=fptr.read()
size=len(data)
fptr.close()

RESPONSE.setHeader("Content-Type", "image/png")
RESPONSE.setHeader("Content-Length", size)

return data

My questions are:
- Does anybody have a clue, why the 'after open' and the next two prints are 
not printed in the log file (I thing /var/log/zope) when I uncomment the line 
above?
- If it is some error within python and/or the PIL, how do I get the error 
output out of zope (I couldn't find this in the docu yet). The strange thing 
is, the request is served, but the lines

print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'

seem to be simply ignored when uncommenting the "img = Image.open(..." line. 
BTW, I can execute the PIL-commands in the normal python-shell without any 
problems.

Thanks for any hint.

Tilo Schwarz

-
DaimlerChrysler AG, Research  Technology
Image Understanding FT3/AB
Dr. Tilo Schwarz
Email: [EMAIL PROTECTED]
Tel:+49-731-505-2376
Fax:+49-731-505-4105
P.O.Box 2360, 89013 Ulm, Germany

___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Hi, Tim

I have it.
The Python Script I sent you:

container.propertysheets['job_info'].manage_changeProperties(REQUEST)

needs to be rewritten:

container.propertysheets.job_info.manage_changeProperties(REQUEST)

Perhaps someone could explain why the first does not work.

One point about your form:

You have id as a form variable.  You will be disappointed by its
behavior.

Regards,

-- Jim Washington

Timothy Wilson wrote:
 
 Jim (or anyone else who's feeling charitable this morning),
 
 Thanks for all your help. I really appreciate it. I wonder if you'd have
 time to look one more time at the two methods I've got that aren't
 working. I've included the actual code for my job posting product. Perhaps
 someone will find it instructive. I have a feeling that the remaining
 problem is not directly related to the processing of the form by the
 PythonScript. I also included the traceback at the end of this message.
 
 Here are the two methods. I have a table that displays the currently
 available jobs and displays two little icons which call the edit or delete
 methods on the corresponding instance of the 'Job Posting' class. The edit
 icon links to the 'editJobForm' method which in turn calls the
 'editFormAction' method that actually processing the change.
 
 --
 editJobForm
 -
 
 dtml-var standard_html_header
 
 h2Edit a Job Board Entry/h2
 pThis form allows you to make changes to current postings on the online
 job board. You don't needed to fill in every
 field on the form. Click on the "Submit Edits" button at the bottom of the
 screen to save your changes to the database./p
 
 dtml-if "REQUEST.form.has_key('editJob')"
 dtml-call "editFormAction(REQUEST)"
 pfont color="red"Your changes have been saved/font/p
 /dtml-if
 
 form action="editJobForm"
 table border="0"
 
 trthNotes/th
 tdtextarea name="notes:text" rows="10" cols="60" wrap="virtual"dtml-var
 notes/textarea/td
 /tr
 trthJob ID/th
 tdinput type="text" name="id" size="20" value="dtml-var id"/td
 /tr
 trthOrganization/th
 tdinput type="text" name="organization" size="60" value="dtml-var
 org_name"/td
 /tr
 trthPosition/th
 tdinput type="text" name="position" size="60" value="dtml-var
 name"/td
 /tr
 trthDescription/th
 tdtextarea
 name="description:text" rows="10" cols="60" wrap="virtual"dtml-var
 description/textarea/td
 /tr
 trthPay Offered/th
 tdinput type="text" name="pay" size="60" value="dtml-var pay"/td
 /tr
 trthLine of Authority/th
 tdinput type="text" name="loa" size="60" value="dtml-var loa"/td
 /tr
 trthFunction/th
 tdtextarea
 name="function:text" rows="4" cols="60" wrap="virtual"dtml-var
 function/textarea/td
 /tr
 trthQualifications/th
 tdtextarea
 name="qualifications:text" rows="8" cols="60" wrap="virtual"dtml-var
 qualifications/textarea/td
 /tr
 tr
 td colspan=2
 pTo create a bullet list of "duties," type each one in the box below and
 press the "ENTER" key
 between each item in the list./p
 /td
 /tr
 trthDuties/th
 dtml-if duties
 tdtextarea name="duties:list" rows="10" cols="60" wrap="virtual"dtml-in
 dutiesdtml-let item=sequence-itemdtml-if item
 dtml-var item
 /dtml-if/dtml-let/dtml-in/textarea/td
 dtml-else
 tdtextarea
 name="duties:list" rows="10" cols="60" wrap="virtual"/textarea/td
 /dtml-if
 /tr
 trthOffer Expires/th
 tdinput type="text" name="expires" size="20" value="dtml-var
 offer_expires fmt="%m/%d/%Y""/td
 /tr
 tr
 td colspan=2pEnter the date that the job was officially posted./p/td
 /tr
 trthPosted Date/th
 tdinput type="text" name="posted" size="20" value="dtml-var date_posted
 fmt="%m/%d/%Y""/td
 /tr
 tr
 tdnbsp;/td
 td
 input type="submit" name="editJob" value=" Submit Edits "
 /form
 form action="admin_html"
 input type="submit" value=" Cancel "
 /form
 /td
 /tr
 /table
 
 dtml-var standard_html_footer
 
 -
 editFormAction (with REQUEST as a parameter)
 -
 
 container.propertysheets['job_info'].manage_changeProperties(REQUEST)
 
 The error I get is:
 
  Error Type: TypeError
 Error Value: sequence index must be integer
 
 Traceback:
 
 Traceback (innermost last):
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
 zpublisher_exception_hook
 (Object: Traversable)
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
 mapply
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
 call_object
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
 __call__
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
 538, in __call__
 (Object: editJobForm)
   File 

Re: [Zope] REQUEST object - obtaining variables from

2001-01-15 Thread Lee

Hi there,

Thanks for your help. I'm currently using the following code, which works perfectly;

dtml-in expr="REQUEST.form.items()"
  dtml-let text="_['sequence-key'] + 'x' + _['sequence-item']"
  dtml-call expr="updateDB(text)"
  /dtml-let
/dtml-in

Randy's response provided the following code, which didn't work nor did any variation
on it. Surprising as it 'appears' to be doing almost the same thing as above(?).

dtml-in expr="REQUEST.form.items()"
dtml-in expr="updateDB(text=_['sequence-key'] + 'x' + _['sequence-item'])"
   dtml-var result
/dtml-in
/dtml-in

Cheers,

Lee

[EMAIL PROTECTED] wrote:

 On Sat, Jan 13, 2001 at 06:11:08PM +, Lee wrote:
 You have indeed overlooked something.  There are tons of things in REQUEST
 unrelated to your form.

 To simply display the entire request, put
 tml-var REQUEST
 in display/index_html

 To access the value of name1 in display/index_html,
 you can use many forms:

 dtml-var REQUEST['name1']

 dtml-var name1#may get something else if name1 is NOT in REQUEST

 dtml-with REQUEST
   dtml-var name1
 /dtml-with

 dtml-in ('name1', 'age1', 'name2', 'age2')
   dtml-var "REQUEST[_.['sequence-item']]"
 /dtml-in

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug




___
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] ZMySQLDA returns truncated/corrupted data?

2001-01-15 Thread Andy Dustman

On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:

 I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
 ZMySQLDA v2.0.1.

Are you really running MySQL 3.22.23? This is a rather old version.
 
 The install appears to be successfull, the Products appear in the Control
 Panel, I can add, and open a database connection.
 
 However, when I issue the following query:
 
 SHOW TABLES;
 
 I receive the following set:
 
 Tables in la_eksempel
 
 a
 
 (la_eksempel the name of the database, naturally)
 
 There is no table named 'a', however there is a table named "artikkel". If
 I try to browse the database, I get a tree with 5 first-level nodes, all
 named with the first letter of a table in my database.

That's very odd, because it works for me.

 If I try "SELECT * FROM ARTIKKEL;", I get 
 
 Error Type: TypeError
 Error Value: len() of unsized object

I don't know if this is the problem, but ZMySQLDA-2.0.1 requires
MySQLdb-0.3.0 (aka MySQL-python). These should both work with
MySQL-3.22.23, though I would recommend an upgrade to at least 3.22.32 (or
3.23.30).

-- 
andy dustman  |  programmer  |  comstar.net is part of the Globix network
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


___
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] Folder upload ?

2001-01-15 Thread Marc Fischer

Hi,

Could anyone tell me, if it is possible to upload a whole folder with all
its including objekts like pictures and things into ZOPE? If yes, tell me
how, please.

And another question: a created my own zclass ( a newsitem). One instance of
this newsitem has the same function like a folder. I can upload for example
a file in it with the tag:

dtml-with News1
dtml-call manage_addFile(...

It works perfect :-) But I cannot insert something with the copy and paste
functions in zope! If I try it, I get the message: The object 'file' does
not support this operation.

Perhaps someone is able to solve my probs ...

Thanx, Marc



___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Timothy Wilson

On Mon, 15 Jan 2001, Jim Washington wrote:

 One point about your form:
 
 You have id as a form variable.  You will be disappointed by its
 behavior.

Thanks Jim.

Care to elaborate on the problems with using id as a form variable.

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.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] How to get python error output? (PIL)

2001-01-15 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
  ... print in external method ...
"print" does not print to the log file but to standard output.

Under Unix (and I think under Windows, too) you can redirect
standard output to a file.

The alternative is to use Zope's Log module (called zLOG).
Its output goes to the log file.


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] renaming python input params in DTML

2001-01-15 Thread Dieter Maurer

Lee writes:
  ...
  I have a Python method expecting 'text' as a parameter ...
  ...
  The Python method, testSQL, returns 'result'.
  ...
  dtml-in expr="REQUEST.form.items()"
  dtml-in expr="testSQL(text='dtml-var sequence-keyxdtml-var
  sequence-item')"
  dtml-var result
  /dtml-in/dtml-in
Inside 'expr="..."' you use "_['x']" instead of dtml-var x.

As this is a Python expression that needs to be evaluated,
it cannot be in a string. You can use the "%" operator
which takes a format string and an object or tuple as
parameters and formats object/tuple according to the string.

If your Python method contains a "return result",
then there is not magically a "result" variable (and there is
not need for it, too).

Are you sure, you want the nested "dtml-in". Looks very strange.

Thus, you can use:

   dtml-in expr="REQUEST.form.items()"
 dtml-var expr="testSQL(text='%sx%s' % (_['sequence-key],_[' sequence-item]))"
   /dtml-in


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] How do I authenticate through pcgi and win2000 ????

2001-01-15 Thread Dieter Maurer

=?iso-8859-1?Q?Max_M=F8ller_Rasmussen?= writes:
  I have installed zope on port 8080 on a win 2K machine.
  
  It runs nicely, but due to firewalls and other reasons it has to run on port
  80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
  
  But when I try to use a manage page I cannot log in without being a member
  of the win2K domain, and that is not feasible in this case. I have tried all
  setting, I think.
  
  Is there any way to do it?
  
  Should I make my own authentication page so users can log on through a form?
  If so how is this done?
You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.


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] Re-posted - How to delete users in Membership product with Persistent User Source

2001-01-15 Thread Bill Anderson

Kamon Ayeva wrote:

 Hi,
 
 Has anyone been able to use the delUserForm to delete
 users added within a PersistentUserSource in the
 PortalMembershipSystem object ?

Yes, quite frequently.


 I am not sure if this piece of code in delUserForm
 preceding the HTML form snippet does the right job:
 
 dtml-let idList="[]"
 dtml-in "UserSource.getPersistentItemIDs()" sort
 dtml-call
 "idList.append(getItem(_['sequence-item']))"
 /dtml-in
 
 dtml-in idList sort=Importance reverse
 ...
 
 I can view the users but when I click on the form
 button to delete some users, I get
 
 I get 
 
 Error Type: NotFound
 Error Value: None


What platform?
What Zope version?
What version of each related/required product?
Is SiteAcces Installed?
If So, what version?



___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Hi, Tim

What is the name of the propertysheet in your ZClass that these values
are on?  Is it 'job_info'?

Where is the editFormAction Python Script? It should be in your ZClass's
/methods.  If you are instead acquiring it from a Folder somewhere, you
will need to use 'context' instead of 'container' inside the Python
Script.

-- Jim Washington


Timothy Wilson wrote:
 
 On Mon, 15 Jan 2001, Jim Washington wrote:
 
  I have it.
  The Python Script I sent you:
 
  container.propertysheets['job_info'].manage_changeProperties(REQUEST)
 
  needs to be rewritten:
 
  container.propertysheets.job_info.manage_changeProperties(REQUEST)
 
 Hey Jim,
 
 I'm getting closer. Now I get the following error and traceback:
 
  Error Type: AttributeError
 Error Value: job_info
 
 Traceback (innermost last):
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
 zpublisher_exception_hook
 (Object: Traversable)
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
 publish
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
 mapply
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
 call_object
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
 __call__
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
 538, in __call__
 (Object: editJobForm)
   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
 336, in eval
 (Object: editFormAction(REQUEST))
 (Info: REQUEST)
   File lt;stringgt;, line 0, in ?
   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
 325, in __call__
 (Object: editFormAction)
   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
 354, in _bindAndExec
 (Object: editFormAction)
   File
 /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
 line 321, in _exec
 (Object: editFormAction)
 (Info: ({'script': lt;PythonScript instance at 873fbd8gt;,
 'context': lt;JobPosting instance at 86b7dc0gt;, 'container': lt;Folder
 instance at 87225f0gt;, 'traverse_subpath': []},
 (lt;h3gt;formlt;/h3gt;lt;tablegt;lt;tr
 valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;postedlt;/thgt;lt;tdgt;'01/15/2001'lt;/tdgt;lt;/trgt;lt;tr
 valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;dutieslt;/thgt;lt;tdgt;['asdfasdf\015\012']lt;/tdgt;lt;/trgt;lt;tr
 valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;positionlt;/thgt;lt;tdgt;'asdfadsfasd'lt;/tdgt;lt;/trgt;lt;tr
 
 -- again snipping the rest of REQUEST --
 
   File Python Script, line 2, in editFormAction
   File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py,
 line 272, in __getattr__
   File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py,
 line 143, in __careful_getattr__
 (Object: Traversable)
 AttributeError: (see above)
 
 Any ideas?

___
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 do I authenticate through pcgi and win2000 ????

2001-01-15 Thread Max M

I just wondered if there is an "AUTHENTICATED_USER.authenticate(userName,
password)" that I could call from a form. And then bypass all that IIS mumbo
jumbo completely.

Guess I will have to dig the sources.

Regards Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Dieter Maurer

  I have installed zope on port 8080 on a win 2K machine.
 
  It runs nicely, but due to firewalls and other reasons it has to run on
port
  80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
 
  But when I try to use a manage page I cannot log in without being a
member
  of the win2K domain, and that is not feasible in this case. I have tried
all
  setting, I think.

You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.


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 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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Timothy Wilson

On Mon, 15 Jan 2001, Jim Washington wrote:

 What is the name of the propertysheet in your ZClass that these values
 are on?  Is it 'job_info'?

Yes.

 Where is the editFormAction Python Script? It should be in your ZClass's
 /methods.  If you are instead acquiring it from a Folder somewhere, you
 will need to use 'context' instead of 'container' inside the Python
 Script.

I had them originally in the ZClass's /methods, but moved them out.

That brings up another good question that I haven't really seen
addressed. Hopefully others are still reading this thread. :-)

When is it proper to make your methods part of the ZClass itself and when
should I put them out in a folder somewhere to be acquired? I've seen it
done both ways in various products, but the difference between the two
approaches has never been completely clear to me.

Can anyone suggest a "rule-of-thumb" here?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.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] online-user-list

2001-01-15 Thread urs.beyeler

i'm building up a community-site in educational use and would like to 
show all the online-users (like on ICQ) ... I'm using GUF for 
user-authentication. any ideas? thnxs.

.urs

___
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] Calling other frames (OT)

2001-01-15 Thread Curtis Maloney

On Monday 15 January 2001 22:51, Oliver Bleutgen wrote:
  I think probably Javascript is the 'cleanest' solution in this case,
  but depending on the complexity of your UI another non-JS approach is
  to make every link target the topmost frome (e.g., target="_top") and
  redraw all frames in the frameset on each 'click'. This way you know
  that all frames reflect the latest situation, but it can be annoying
  to see the whole browser redraw every time you do anything. However,
  if your browser doesn't *do* Javascript (so long as it does do
  frames hmm.. how likely is that?) then it would at least work

 There' s always the possibility that people disable javascript -
 and checking for instance http://www.guninski.com/browsers.html
 I would say they have reason to do so.


Agreed.  I run NS4.76 with JavaScript disabled... it's the only way I've 
found to stop it pissing away my memory.

 My take is that one should at least provide a non-javascript alternative
 to browse the site. This also helps with search-engines

IMHO, JavaScript should be used to provide faster access to the same 
interface, but never to add functionality that is not otherwise available.  A 
great example is http://www.asus.com.tw  ...  they have a side-bar menu 
which, with JS, will give you sub-menus when you hover over the links, etc.  
However, if you just click on the link, you are taken to a sub page which has 
the very same sub-menu, and this happens regardless of JS.

 cheers,
 oliver



As for this frame problem... seems like you're voiding the best (IMHO) use of 
frames, which is to prevent reloading of portions of the page.  Otherwise I 
just render all the objects into elements of an 'uber-table'...

Have a better one,
Curtis Maloney

___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Timothy Wilson wrote:
 
 On Mon, 15 Jan 2001, Jim Washington wrote:
 
  Where is the editFormAction Python Script? It should be in your ZClass's
  /methods.  If you are instead acquiring it from a Folder somewhere, you
  will need to use 'context' instead of 'container' inside the Python
  Script.
 
 I'm not getting any errors now that I've changed the editFormAction to refer
 to 'context'. My guy feeling is that these methods should be methods of the
 ZClass so I'll probably change that, but for now no errors.
 
 Unfortunately, however, the instance isn't getting updated either. After
 hitting submit I get the red "Your changes have been saved" and the edit
 form is visible, but the same old values are there. When I view the instance
 after updating I also see the same of values. Apparently either REQUEST
 doesn't contain the data it's supposed to or the instance isn't being
 properly modified with REQUEST's contents. Any thoughts?

I would put the Python Script in the ZClass's /methods and see what
happens.

-- Jim

___
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 structured-text behaviour in Python Product.

2001-01-15 Thread Max M

I have a Python product where I have a variable called self.description but
when I try to show it with dtml-var description fmt=structured-text the
text doesn't get formatted.  Is there any good reason for that?

It shows the text just fine, just not as structured-text.

Regards

Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] Adding content type to internet explorer

2001-01-15 Thread Hung Jung Lu

Hi,

Can someone tell me how to add content types (and the associated program) to 
internet explorer on Windows platform? Is it in the registry?

thanks,

Hung Jung

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Embedding DTML

2001-01-15 Thread richard

Zope 2.3 CVS

I have a Python product that calls HTMLFile objects from within other
HTMLFile objects. Suppose the first file is:

dtml-var "page_html(this())"

and the second file, page_html, is:

dtml-var REQUEST
dtml-URL1;

I get a KeyError on URL1. If this file is:

dtml-var REQUEST
dtml-var "REQUEST.URL1"

then it works fine. Any clues?


 Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
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] Photo Jpeg Support Problems

2001-01-15 Thread J. Atwood

I have been playing around with Drew's photo product and it works 
great with GIFs but when I try to upload a JPEG into it I get the 
following

Error Type: IOError
Error Value: decoder jpeg not available

Traceback (innermost last):
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
   File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
 (Object: manage_addPhoto)
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
 (Object: manage_addPhoto)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 132, 
in manage_addPhoto
 (Object: Traversable)
   File /usr/local/zope/lib/python/OFS/Image.py, line 276, in manage_upload
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 290, 
in update_data
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 319, 
in _generateDisplays
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 329, 
in _generateDisplay
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 370, in resize
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python1.5/PIL/Image.py, line 634, in resize
   File /usr/local/zope/lib/python1.5/PIL/ImageFile.py, line 133, in load
   File /usr/local/zope/lib/python1.5/PIL/Image.py, line 237, in _getdecoder
IOError: (see above)

I have tried and tried again to recompile jpeg, include the path.. 
whatever! I am using Zope 2.2.4 , on RH 6.2

Thanks,
J

___
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] Searching method using DTML

2001-01-15 Thread Angietel



dtml-if "_['custname']!=''AND 
_['custid']==''"

 dtml-call 
"sqlSearchcust3"

dtml-elif "_['custid']!=''AND 
_['custname']==''"

 dtml-call 
"sqlSearchcust2" dtml-elif "_['custid']!=''AND 
_['custname']!=''"

 dtml-call 
"sqlSearchcust" dtml-else

 dtml-var 
expr="REQUEST['/Customer/View/searchallcust']"

/dtml-if

The ZOPE error is like :-

Expression (Python) Syntax 
error: invalid syntax
, for tag dtml-if "_['custname']!=''AND 
_['custid']==''", on line 20 of a


[Zope] Can't access Control_Panel from folder with SiteRoot

2001-01-15 Thread Itai Tavor

Hi,

I use Apache's ProxyPass to access a site in a Zope folder. The 
VirtualHost directive contains:

VirtualHost 10.0.1.21:80
 ServerName MySite
 ProxyPass / http://10.0.1.20:8080/MySite/
 ProxyPassReverse / http://10.0.1.20:8080/MySite/
 ProxyPass /misc_ http://10.0.1.20:8080/misc_
 ProxyPass /p_ http://10.0.1.20:8080/p_
/VirtualHost

The MySite folder contains a SiteRoot with base = 'http://10.0.1.21' 
and path = '/'.

I have a method that accesses properties stored in a Common Instance 
property sheet of a ZClass:

   dtml-var 
"Control_Panel.Products.MyProduct.MyZClass.propertysheets.common.Constants.getProperty('my_property')"

This works using http://10.0.1.20:8080/MySite/myMethod, but fails 
with NameError: Control_Panel when called using 
http://10.0.1.21/myMethod.

In fact, even a very simple dtml-var Control_Panel fails in the same way.

Why is this happening? How can I get around it?

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] Newbie: Displaying another objects properties

2001-01-15 Thread Michael Garrison Stuber

I've looked all over (the Zope book, the zope site, the Zope Newbie site,
the Zope group archives) and I'm still confused.  I'm trying to do something
like this:

DTMLDocument1:
Contents{

dtml-var DTMLDocument2

dtml-with DTMLDocument2
dtml-var Document2Property
/dtml-with

}

DTMLDocument2:
Contents{

H2Blah blah blah/H2

}
Document2Property{

Spoken by the blahster

}

Basically, from a DTML document I'd like to display (or otherwise reference)
the properties of another DTML document.  I've tried _, REQUEST, getattr,
and direct references to DTMLDocument2 all to no avail.  Surely there is a
way to do this.  (I hope).  Help!  Thanks

--
Michael T. Garrison Stuber


--
Michael T. Garrison Stuber



___
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-posted - How to delete users in Membership product with Persistent User Source

2001-01-15 Thread Dirksen

The delUserForm calls 'deleteInstances' to do the job, yet 'deleteInstances' is not
provided with the product, instead 'manage_deleteUsers' is. When I change
'deleteInstances' to 'manage_deleteUsers' in the code of delUserForm, things work out.

Bill, it's probably a bug :)

cheers
Dirksen

--- Bill Anderson [EMAIL PROTECTED] wrote:
 Kamon Ayeva wrote:
 
  Hi,
  
  Has anyone been able to use the delUserForm to delete
  users added within a PersistentUserSource in the
  PortalMembershipSystem object ?
 
 Yes, quite frequently.
 
 
  I am not sure if this piece of code in delUserForm
  preceding the HTML form snippet does the right job:
  
  dtml-let idList="[]"
  dtml-in "UserSource.getPersistentItemIDs()" sort
  dtml-call
  "idList.append(getItem(_['sequence-item']))"
  /dtml-in
  
  dtml-in idList sort=Importance reverse
  ...
  
  I can view the users but when I click on the form
  button to delete some users, I get
  
  I get 
  
  Error Type: NotFound
  Error Value: None
 
 
 What platform?
 What Zope version?
 What version of each related/required product?
 Is SiteAcces Installed?
 If So, what version?
 
 
 
 ___
 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 )
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.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] Newbie: Displaying another objects properties

2001-01-15 Thread Andy McKay

Document 2 has property: name=foo, type=string, value=bar
Document 1 dtml:

dtml-with "Document2"
  dtml-var foo
/dtml-with

or

dtml-var "Document2.foo"

Assuming Document1 and 2 are in the same folder.

--
  Andy McKay.


- Original Message -
From: "Michael Garrison Stuber" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 15, 2001 5:26 PM
Subject: [Zope] Newbie: Displaying another objects properties


 I've looked all over (the Zope book, the zope site, the Zope Newbie site,
 the Zope group archives) and I'm still confused.  I'm trying to do
something
 like this:

 DTMLDocument1:
 Contents{

 dtml-var DTMLDocument2

 dtml-with DTMLDocument2
 dtml-var Document2Property
 /dtml-with

 }

 DTMLDocument2:
 Contents{

 H2Blah blah blah/H2

 }
 Document2Property{

 Spoken by the blahster

 }

 Basically, from a DTML document I'd like to display (or otherwise
reference)
 the properties of another DTML document.  I've tried _, REQUEST, getattr,
 and direct references to DTMLDocument2 all to no avail.  Surely there is a
 way to do this.  (I hope).  Help!  Thanks

 --
 Michael T. Garrison Stuber


 --
 Michael T. Garrison Stuber



 ___
 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] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

hello all
i'm about to jump into uncharted waters (well, for me at least)
i have a news site, and would like to use ZCatalog to present, index, etc 
news.  all's well and good.  
i have a functioning ZClass, that is catalog aware, and searchable.

what i'd like to know is 
-the stability of ZCatalog as of 2.2.5.  
-what's in store in 2.3
-upgradability from 2.2.5 to 2.3
-heartstopping bugs that i may have not encountered yet
-performance speed/response.

with my limited tests[1], i got ok response time, compared to what i have now 
where i iterate through objectItems/Values.  but when i cache with 
CachePool[2], response is better.  correct me if i'm wrong.

i'd like to not go thru what i'm going thru now.

but will this hold water?  especially since i expect more requests.

thanks
---8
[1]
/usr/sbin/ab -n 300 -c 200 myurl
This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.9
Server Hostname:203.106.2.200
Server Port:80

Document Path:  
myurl
Document Length:9644 bytes

Concurrency Level:  200
Time taken for tests:   33.586 seconds
Complete requests:  300
Failed requests:0
Total transferred:  3030864 bytes
HTML transferred:   2916288 bytes
Requests per second:8.93
Transfer rate:  90.24 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:145   162
Processing:   736 14748 25346
Total:737 14793 25508

[2]
/usr/sbin/ab -n 300 -c 200 myotherurl
This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.9
Server Hostname:203.106.2.200
Server Port:80

Document Path:  
myotherurl
Document Length:9524 bytes

Concurrency Level:  200
Time taken for tests:   7.646 seconds
Complete requests:  300
Failed requests:0
Total transferred:  2949432 bytes
HTML transferred:   2862705 bytes
Requests per second:39.24
Transfer rate:  385.75 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:14483
Processing:   320  3291  4800
Total:321  3335  4883

-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Strange how laughter looks like crying with no sound, and raindrops taste 
like tears .. without the pain


___
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] Calling other frames (OT)

2001-01-15 Thread Dennis Nichols

At 1/16/01 08:58 AM, Curtis Maloney wrote:
As for this frame problem... seems like you're voiding the best (IMHO) use of
frames, which is to prevent reloading of portions of the page.  Otherwise I
just render all the objects into elements of an 'uber-table'...

I agree with Curtis about frames providing the wonderful ability to reload 
part of the page without reloading and redrawing the whole mess. But... the 
frame most likely to be reloaded is the one with the content (as opposed to 
the navigation, advertisement, and other decorative frames) and if you 
don't reload the frameset then you can't bookmark that particular content. 
What to do about that?




--
Dennis Nichols
[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 )




Re: [Zope] request for advice: using ZCatalog

2001-01-15 Thread Chris McDonough

If I were you, I'd wait for 2.3 final.  There are some significant changes
that need to make it into 2.3 yet as far as ZCatalog goes, including some
textindex bugfixes and merging of textindexes on update.  2.2.5 has some
Catalog bugfixes, but more bugs have been discovered and squashed since
then.

- Original Message -
From: "Bak@kedai" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 15, 2001 9:06 PM
Subject: [Zope] request for advice: using ZCatalog


 hello all
 i'm about to jump into uncharted waters (well, for me at least)
 i have a news site, and would like to use ZCatalog to present, index, etc
 news.  all's well and good.
 i have a functioning ZClass, that is catalog aware, and searchable.

 what i'd like to know is
 -the stability of ZCatalog as of 2.2.5.
 -what's in store in 2.3
 -upgradability from 2.2.5 to 2.3
 -heartstopping bugs that i may have not encountered yet
 -performance speed/response.

 with my limited tests[1], i got ok response time, compared to what i have
now
 where i iterate through objectItems/Values.  but when i cache with
 CachePool[2], response is better.  correct me if i'm wrong.

 i'd like to not go thru what i'm going thru now.

 but will this hold water?  especially since i expect more requests.

 thanks
 ---8
 [1]
 /usr/sbin/ab -n 300 -c 200 myurl
 This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
 Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

 Server Software:Apache/1.3.9
 Server Hostname:203.106.2.200
 Server Port:80

 Document Path:
 myurl
 Document Length:9644 bytes

 Concurrency Level:  200
 Time taken for tests:   33.586 seconds
 Complete requests:  300
 Failed requests:0
 Total transferred:  3030864 bytes
 HTML transferred:   2916288 bytes
 Requests per second:8.93
 Transfer rate:  90.24 kb/s received

 Connnection Times (ms)
   min   avg   max
 Connect:145   162
 Processing:   736 14748 25346
 Total:737 14793 25508

 [2]
 /usr/sbin/ab -n 300 -c 200 myotherurl
 This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
 Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

 Server Software:Apache/1.3.9
 Server Hostname:203.106.2.200
 Server Port:80

 Document Path:
 myotherurl
 Document Length:9524 bytes

 Concurrency Level:  200
 Time taken for tests:   7.646 seconds
 Complete requests:  300
 Failed requests:0
 Total transferred:  2949432 bytes
 HTML transferred:   2862705 bytes
 Requests per second:39.24
 Transfer rate:  385.75 kb/s received

 Connnection Times (ms)
   min   avg   max
 Connect:14483
 Processing:   320  3291  4800
 Total:321  3335  4883

 --

 http://www.kedai.com.my/kk
 http://www.kedai.com.my/eZine

 Strange how laughter looks like crying with no sound, and raindrops taste
 like tears .. without the pain


 ___
 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] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

On Tuesday 16 January 2001 11:05, Chris McDonough wrote:
 If I were you, I'd wait for 2.3 final.  There are some significant changes
 that need to make it into 2.3 yet as far as ZCatalog goes, including some
 textindex bugfixes and merging of textindexes on update.  2.2.5 has some
 Catalog bugfixes, but more bugs have been discovered and squashed since
 then.

ok
this puts me in a tight spot. any 2.3 ETA?  i don't know how long i can hold 
this.  will 2.3 be backward compatible to 2.2.x?  if that's the case, it 
should take care of the upgrade path.  and i can try and live with 2.2.5 and 
its bugs until 2.3 arrives.  

hoping that upgrading 2.2.x to 2.3.x to be as easy as upgrading from 2.1.x to 
2.2.x.

thanks 
-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Strange how laughter looks like crying with no sound, and raindrops taste 
like tears .. without the pain


___
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] sendmail implementation problem

2001-01-15 Thread Lee

Hi,

This is more of an implementation problem that anything else, which is
probably starightforward enough for those with more experience that
myself. The simplified version is as follows:

Form A collects usernames and send these to Form B.

Form B takes the input parameters from the REQUEST object and places
them in 'hidden' form inputs with name="username" and provides some
input textfields prompting for 'subject', 'message', etc. These are
submitted to Form C

Form C displays all the parameters in the REQUEST object and gives a
view of what the email will look like, e.g.

+---=
| To: [EMAIL PROTECTED]   |
| From: [EMAIL PROTECTED], [EMAIL PROTECTED]   |
| Subject: Zope |   
|   |
| My message here   |
|   |   
+---=

Everything (bar the recipients) can be specifided using dtml-var
subject, etc. as required but as the usernames in the hidden field are
passed into a method, which does not know their names; I have to get
them from the REQUEST object again. I have produced the following code
to collect all the usernames (used to creat recipients email address);

dtml-in expr="REQUEST.form.items()" 
dtml-if expr="(_['sequence-key'] == 'message') or (_['sequence-key'] ==
'message') or (_['sequence-key'] == 'sender') or (_['sequence-key'] ==
'senderEmail') or (_['sequence-key'] == 'subject')"
dtml-elsedtml-var name="sequence-key": dtml-var
name="sequence-item"
/dtml-if
/dtml-in

So displaying the email is easy but how can I send this to my sendmail
method?

1 - Simply collect all the usernames, variables in hidden fields and
send them onto sendmail?
2 - or is there a way to CALL my sendmail method for each individual
recipient (email address) from this method simply by hitting a SUBMIT
button?

Which is the easiest/most efficient way to go about this? Ideally, I
want the email dislayed (like it's formatted above) and then just simply
hit a submit button to send it to multiple recipients. I'd rather not
have something like 'lee.reilly@ntlworld, [EMAIL PROTECTED]' in the 'To:'
field - just multiple, individual emails.

It's late - but I hope that makes sense(?). Thanks very much for any
guidance you can give me!

- Best regards,

Lee

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug


___
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] request for advice: using ZCatalog

2001-01-15 Thread Chris McDonough

2.3 final should be out by the end of the month.  The details are at
http://dev.zope.org/Resources/zope_230_plan.html

Upgrading from 2.2.X to 2.3 should require minimal effort.

- Original Message -
From: "Bak@kedai" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 15, 2001 10:09 PM
Subject: Re: [Zope] request for advice: using ZCatalog


 On Tuesday 16 January 2001 11:05, Chris McDonough wrote:
  If I were you, I'd wait for 2.3 final.  There are some significant
changes
  that need to make it into 2.3 yet as far as ZCatalog goes, including
some
  textindex bugfixes and merging of textindexes on update.  2.2.5 has some
  Catalog bugfixes, but more bugs have been discovered and squashed since
  then.
 
 ok
 this puts me in a tight spot. any 2.3 ETA?  i don't know how long i can
hold
 this.  will 2.3 be backward compatible to 2.2.x?  if that's the case, it
 should take care of the upgrade path.  and i can try and live with 2.2.5
and
 its bugs until 2.3 arrives.

 hoping that upgrading 2.2.x to 2.3.x to be as easy as upgrading from 2.1.x
to
 2.2.x.

 thanks
 --

 http://www.kedai.com.my/kk
 http://www.kedai.com.my/eZine

 Strange how laughter looks like crying with no sound, and raindrops taste
 like tears .. without the pain


 ___
 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] DTML-dtml-in dtml-call

2001-01-15 Thread Angietel




Is dtml-call REQUEST['sqlSearchcust3'] 
equal to dtml-in sqlSearchcust3


Re: [Zope] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

On Tuesday 16 January 2001 12:31, Chris McDonough wrote:
 2.3 final should be out by the end of the month.  The details are at
 http://dev.zope.org/Resources/zope_230_plan.html

 Upgrading from 2.2.X to 2.3 should require minimal effort.

ya know, this really shows why digicool really fits you guys.  you guys 
really are cool.

thanks 
-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Get the tables!


___
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] Embedding DTML

2001-01-15 Thread richard

[EMAIL PROTECTED] wrote:
 
 Zope 2.3 CVS
 
 I have a Python product that calls HTMLFile objects from within other
 HTMLFile objects. Suppose the first file is:
 
 dtml-var "page_html(this())"
 
 and the second file, page_html, is:
 
 dtml-var REQUEST
 dtml-URL1;
 
 I get a KeyError on URL1. If this file is:
 
 dtml-var REQUEST
 dtml-var "REQUEST.URL1"
 
 then it works fine. Any clues?

   Of course, the obvious problem was that I was calling the page_html
incorrectly. I remember years ago when I was using DTML under Bobo that I
ran into this exact same problem, and Jim Fulton pointed out the error of
my ways. Of course, it's all still black magic, and Jim's elsewhere, so I
hadda delve into the DocumentTemplate source to find the solution myself.
Four head-hurting hours later, the solution is:

dtml-var "page_html(REQUEST)"

   And all is made better.


  Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
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 to display only x records with dtml-in

2001-01-15 Thread Timothy Wilson

Hey everyone,

I've got a method to display some text which uses 
dtml-in "objectValues(['Spam and Eggs'])"
to iterate through a bunch of "Spam and Eggs" ZClass instances. I thought
that I could use size="2" in the dtml-in to display only the first two
instances, but it's not working. I want to display only the first two and
use a link at the bottom to direct people to see the rest on a separate
page. Any ideas?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.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] Re: mysql connection string

2001-01-15 Thread Andy Dustman

On Mon, 15 Jan 2001, Olaf Zanger wrote:

 first:
 right now my setup uses a connection string db root which doesn't seam
 to give a lot of savety :-). 
 at my provider i have a login, but sure no root access to the db. 
 * how does the connection string look for user name peter-hauser and
 password test3-.2?
 * has the user to be set up in linux ?
 * how is the setup made in mysql?
 i tried with grant all privileges on *.* to peter-hauser@localhost;
 and set password for peter-hauser=password('test3-.2');
 but wasn't successful.
 * has zope to be run by user peter-hauser?
 
 second?
 to set up a 3-tier application i should know how to connect mysql
 through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.
 
 * i can browse from the zope server to the db-server pit and otherway
 round with the names pit and pitechon, so hosts file should be
 correct. 
 
 * how has the connection string to look like?
 i tried db@pit 'peter-hauser' but it didn't work?
 * has mysql to be started with an special flag to open a port?
 * does it work with the ip-number?

I thought what it printed when you created the connection would be
sufficient:

The connection string used for Z MySQL Database Connection is of the form: 

   database[@host[:port]] [user [password [unix_socket]]]

or typically: 

   database user password

to use a MySQL server on localhost via the standard UNIX socket. Only
specify host if the server is on a remote system. You can use a
non-standard port, if necessary. If the UNIX socket is in a non-standard
location, you can specify the full path to it after the password.

...so you want something like: db@pit peter-hauser test3-.2
If pit is the local host: db peter-hauser test3-.2
...will be faster and use the standard UNIX socket.

You do not necessarily need a UNIX user by that name. Your GRANT statement
looks basically correct, but check the MySQL documentation.

-- 
Andy Dustman PGP: 0xC72F3F1D
@   .net http://dustman.net/andy


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