Re: [Zope-dev] How to confuse the publishing process

2001-01-04 Thread Chris Withers

Steve Spicklemire wrote:
 
 I don't see the behavior you describe..  What did I
 misunderstand?

Prolly nothing. I was more than likely just doing something stupid :-)

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] case insensitive sorts

2001-01-04 Thread Chris Withers

Dieter Maurer wrote:
 
 Chris Withers writes:
   Andrew
   bart
   David
   sophie
   Wayne
 Why in hell do you switch caseness for similar objects?

Who said anything about objects? I was just talking about lists of
strings and in general, people prefer sorting based on the character to
take precedence over sorting based on the case of that character.

Sadly, python's default sort does it the other way round :-(

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] Acquisition wishlist :-)

2001-01-04 Thread Chris Withers

Dieter Maurer wrote:
 
acquisition.donotacquire('index_html')
 This would be great.

Indeed :-)

   class MyClass (Acquisition.Explicit):
  
acquisition = ClassAcquisitionInfo()
  
acquisition.acquire('index_html')
acquisition.acquire('fred')
 You already can do that, though with a different syntax
 (I would need to search for in the documentation).

You may mean that if x is an Acquisition.Explicit object, you can do:

x.aq_acquire('your_attribute') (syntax may be wrong ;-)

What I meant is that through a declaration in the class you could saying
acquire the 'your_attribute' attribute but nothing else. So, you could
still do:

x.your_attribute ...which would be acquired, but...
x.index_html ...which wouldn't be acquired.

cheers,

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

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




Re: [Zope-dev] ZPatterns question

2001-01-04 Thread Chris Withers



Christian Scholz wrote:
 
 Well, virtual in the sense as a specialist is no real folder but can
 provide content from different sources. Thus what I mean is some mechanism
 which emulates objectIds() etc. so it looks to the user (and the ones
 using it via dtml) like a normal folder object.
 Somehow like the Customizer but without the need for actually creating
 Zope objects. Something inbetween Specialist and Customizer this would be
 I guess.

yeah, this is exactly what I'm after too. I'd like the virtual objects
the specialist is responsible for to have normal Zope management
screens.

Also, much mroe trickily, I'd like them to be able to contain each
other, although Steve A's __bobo_traverse__ trick might help with this
bit...


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] CatalogAware

2001-01-04 Thread Erik Enge

[Chris Withers]

| The point behind CatalogAware was, as I understand it, that the object
| inheriting from CatalogAware wouldn't have to worry about managing its
| own indexing. Sadly, that didn't work out...

I haven't been following this discussion, so my question may be
redundant, and if it is I'm sorry.  :)

Are you saying that, as a general rule, inheriting from CatalogAware
and using index_object, reindex_object and unindex_object does not
work?  Or, probably more likely, are you saying that since you have to
put index_object in the __init__ method you consider it to be managing
its own indexing?

Thanks :)

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

2001-01-04 Thread Chris Withers

Erik Enge wrote:
 
 Are you saying that, as a general rule, inheriting from CatalogAware
 and using index_object, reindex_object and unindex_object does not
 work? 

It probably does, but if you're a catalog yourself anyway, as Squishdot
is, it just more overhead rather than calling your own catalog_object
and uncatalog_object methods ;-)

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] Objects with multiple parents and storage flexibility, ZPatterns?

2001-01-04 Thread Chris Withers

Thanks... this sounds a lot like what I'm after :-)

Steve Spicklemire wrote:
I think that if you make your DataSkins folderish it will be hard
 to make the storage anything other than ZODB. 

Well, I don't mind the 'skins' being stored in the ZODB, but, as Steve A
mentioned, I _would_ like stuff created in the RDBMS to 'magically
appear' in the Zope side of things. I guess that means FwCS and
folder-subclassing DataSkins are a no-no?

 Let's say your objects have an attribute that
 defines them in the context of their parent (e.g., dataskin2 in your
 example URL),

their id in Zope parlance, right?

 let's call it 'context_id'. You may have six objects
 with the same context_id, but they would all have different parents.

They may each have mutliple parents too ;-)
The point for me is that the id (context_id in your example) is unique
in terms of _only_ the following constraint:
No parent may have more than one child with the same id.
This is actually how the ZODB works except that it objects in the ZODB
may only have one parent (well, at least ZODBs managed with Zope ;-)

 Now.. you could implement a search interface that finds an object
 in context.
 
 GetObjectInContextOfParent( context_id, parent_id )

might be better if it resolved a path into an object, like Zope does,
hence my keenness to see if there isn't a simple way I can make Zope and
Zpatterns do the bulk of the work, just with the tweaks I need...

 Now for the traversal interface:
 
 def __bobo_traverse__(self, REQUEST, name):
 ob = getattr(self, name, _marker)
 if ob is _marker:
 ob = self.GetObjectInContextOfParent( context_id = name, parent_id = 
self.id)
 if ob is not None:
 return ob
 raise 'NotFound'
 return ob

looks good...

 Totally untested of course. ;-) Anyway the idea would be to *not* use folderish
 DataSkins, but to build a hierarchy out of them that could be traversed.

Hurm... I'd love them to have a UI identical to normal Zope
folders/objectmanagers, though, with properties, a security tab, and, in
a dream world, the ability to drop normal DTML methods, python Scripts
and the like into the foldersish objects.

Is this asking for too much? ;-)

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] Re: Objects with multiple parents and storage flexibility, ZPatterns?

2001-01-04 Thread Chris Withers

Steve Alexander wrote:
 
 If you use a Folder w/ Customizer Support, you'll need to create all the
 DataSkin instances in the ZODB, just as if they were normal ZClass (or
 whatever) instances. Thus, the instances all need to be "in there" to
 start with. 

Shame, although if I'm really brutal and XP about this, that might not
matter...

 You can't add data to your external database, and expect a
 new Dataskin instance to pop up in the ZODB. This is what is meant by
 "When using Folder with Customizer Support, DataSkins are anchored in
 the ZODB".

Is this always going to be the case or just the current implementation?

 You can get the data for your dataskins from a variety of sources,
 whether you choose to use Specialists or Folder w/ Customizer Support.

Cool... would creating a folder objects that subclasses FwCS _and_
DataSkin be a very bad thing, or could I maybe get what I want doing
that and supplying things like objectIds with an attribute provider?

 However, if you use Specialists, you can have the DataSkin instances
 appear only when requested. Thus, you can add records to your external
 database, and thereby have new Dataskins available from your application.

Hurm... could this not be achvieved if, like I mentioned earlier,
objectIds, and whatever else is neeeded, is supplied by something
ZPatterns-ish?

  I briefly described this on zope-dev a couple of days ago.

Yup, I saw :-)

Many thanks for all the help,

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] Objects with multiple parents and storageflexibility, ZPatterns?

2001-01-04 Thread Chris Withers

"Phillip J. Eby" wrote:
 
 You can't really "nest" DataSkins inside each other in a rack, and you
 really don't want to, anyway.  

I kindof agree, I guess nesting doesn't mean a lot in RDBMS terms? ;-)

 But there's nothing that says you can't
 create a DataSkin subclass whose __bobo_traverse__ looks up related
 objects.  

Hurm, could something similar be doen so a DataSkin could implement the
objectmanager interface?

 You just can't "really" store the DataSkins inside each other.

I don't want to, I only want it to appear to Zope, ZPublisher and the
Management Interface as if that was the case. The only difference being
that 'objects' can appear under more than one parent.

 Note that if your __bobo_traverse__ uses a specialist "getXforY()" call,
 you can "store" objects from different databases (racks) "inside" each
 other.  :)

I like the sound of that :-)

Well, thanks for the help so far, I'm going to have to bite the bullet
and start implementing tomorrow :-S

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] Objects with multiple parents and storage flexibility, ZPatterns?

2001-01-04 Thread Steve Spicklemire


Hi Chris,

 "Chris" == Chris Withers [EMAIL PROTECTED] writes:


Chris Steve Spicklemire wrote:
 I think that if you make your DataSkins folderish it will be
 hard to make the storage anything other than ZODB.

Chris Well, I don't mind the 'skins' being stored in the ZODB,
Chris but, as Steve A mentioned, I _would_ like stuff created in
Chris the RDBMS to 'magically appear' in the Zope side of
Chris things. I guess that means FwCS and folder-subclassing
Chris DataSkins are a no-no?

No... I don't think so! If you don't mind keeping stuff in ZODB
then you *could* have a traversal interface that made stuff 'appear'
wherever you want it to, though its persistent storage would 'really' 
be in a Rack or FwCS.

 Let's say your objects have an attribute that defines them in
 the context of their parent (e.g., dataskin2 in your example
 URL),

Chris their id in Zope parlance, right?

Hmm. not really...  the Zope 'id' is used by the Rack to keep track
of all the objects of a single type. If all your 'X's are kept in one
Rack, they all need a unique 'id'. The idea context_id is an id-like
attribute that 'plays the role of id' in the context of a particular
parent. It's probably a bad name... but all I could think of in 5
minutes... 

 let's call it 'context_id'. You may have six objects with the
 same context_id, but they would all have different parents.

Chris They may each have mutliple parents too ;-) The point for
Chris me is that the id (context_id in your example) is unique in
Chris terms of _only_ the following constraint: No parent may
Chris have more than one child with the same id.  This is
Chris actually how the ZODB works except that it objects in the
Chris ZODB may only have one parent (well, at least ZODBs managed
Chris with Zope ;-)

Wow... multiple parents, multiple children.. it's almost incestuous!
So long as you can write queries for 'find parents for child x' and
'find children for parent y' it shouldn't matter. If not you'll need
to keep references to parents/childred stored in the objects and that
can be bothersome, but possible.

 Now.. you could implement a search interface that finds an
 object in context.
 
 GetObjectInContextOfParent( context_id, parent_id )

Chris might be better if it resolved a path into an object, like
Chris Zope does, hence my keenness to see if there isn't a simple
Chris way I can make Zope and Zpatterns do the bulk of the work,
Chris just with the tweaks I need...

I'm not sure how the path will help you at this point... but if you need
it you can always ask Zope for it once traversal is complete.

 Now for the traversal interface:
 
 def __bobo_traverse__(self, REQUEST, name): ob = getattr(self,
 name, _marker) if ob is _marker: ob =
 self.GetObjectInContextOfParent( context_id = name, parent_id =
 self.id) if ob is not None: return ob raise 'NotFound' return
 ob

Chris looks good...

 Totally untested of course. ;-) Anyway the idea would be to
 *not* use folderish DataSkins, but to build a hierarchy out of
 them that could be traversed.

Chris Hurm... I'd love them to have a UI identical to normal Zope
Chris folders/objectmanagers, though, with properties, a security
Chris tab, and, in a dream world, the ability to drop normal DTML
Chris methods, python Scripts and the like into the foldersish
Chris objects.

Chris Is this asking for too much? ;-)

You can never *ask* for too much. ;-) 

Seriously though... for this you'll probably need to store the objects
persistently in the Rack(s), though you could farm some of their
attributes out to other data storage systems with SkinScript. Nothing
will prevent you from making your DataSkins inherit from ObjectManager
or Folder, but you won't be able to completely 'virtualize' them.  The
only way I *think* you could make this work with completely virtual
data-skins is to create 'sister' classes to everything you wanted to
add (e.g. 'SkinDTML Method' and 'SkinPython Script' which would be new
classes that inherit from DataSkin *and* the class you want to emulate
(and probably yet another class that hanldles the interconnection glue
parents/context and all that). Then you'd need to add whatever
attribute providers were necessary to keep all the attributes of the
original classes (e.g., DTML Method) in your external storage. But it
sounds like you just want to keep 'some' of the associated data
in the external source... so I don't think any of that will be
necessary.

good luck!
-steve

Chris 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] case insensitive sorts

2001-01-04 Thread Tres Seaver

Chris Withers [EMAIL PROTECTED] wrote:
 
 Andy McKay wrote:
  
  They want information fast and most users expect case insensitive sorts. Its
  simpler and easy. I think having the ignore_case option for a -tree and -in
  helps Zope by increasing the ease of development and friendliness to the
  user.
 
 And my point was that this is so universally true that the _pthyon_ sort
 function (which is at fault here) should be fixed :-)

Python's sort already allows you to pass an alternate comparison
function::

 [/var/home/tres] $ python
 Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66
19990314/Linux (egcs- on linux-i386
 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  foo = [ 'z', 'y', 'x' ]
  foo.sort()
  foo
 ['x', 'y', 'z']
  foo.sort( lambda x, y: cmp(y,x) )
  foo
 ['z', 'y', 'x']

I believe Andy's patch makes use of this feature.  You are missing
a couple of points if you *require* a case-insensitive sort:

 * collation (which letters belong together) is highly locale
   sensitive (e.g., does a-accent-grave sort with a? etc.)

 * Should strings which differ only in case be equal (*NOT*!)

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

___
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] WIN2K batch problem

2001-01-04 Thread Robin Becker

I'm trying to run Zope 2.2.2 under win2000 in a batch file. I'm just
watching error messages and prints. I find that when zope has written a
page to the cmd.exe window it locks further prints from python until I
hit a key in the window and then it releases another page full. Is there
a Win NT/2K guru who knows about such things and how to prevent this? 
-- 
Robin Becker

___
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] case insensitive sorts

2001-01-04 Thread Andy Dawkins


  * collation (which letters belong together) is highly locale
sensitive (e.g., does a-accent-grave sort with a? etc.)


A Fair point.

The answer is whatever seems _naturally_ correct from a users point of view.
I think the answer is yes.

Elephant
entropy
écrit
élan

i.e. In the order in which they would appear in a dictionary.

  * Should strings which differ only in case be equal (*NOT*!)


'Ant' is not equal to 'ant' but 'Ant''ant''Ante''ante'

i.e.

Ant
ant
Ante
ante

Would be a sensible sort order.

I hope that makes things a bit clearer.

-Andy


___
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] case insensitive sorts

2001-01-04 Thread Shane Hathaway

Chris Withers wrote:
 
 Dieter Maurer wrote:
 
  Chris Withers writes:
Andrew
bart
David
sophie
Wayne
  Why in hell do you switch caseness for similar objects?
 
 Who said anything about objects? I was just talking about lists of
 strings and in general, people prefer sorting based on the character to
 take precedence over sorting based on the case of that character.
 
 Sadly, python's default sort does it the other way round :-(

This is not wrong.  Again, if the default sort tried to sort
case-insensitively, it would yield incorrect results for existing code
that sorts lists of strings containing data rather than text.  And
again, what you really want is a "textops" module that does something
like this:

def sort_strings(data):
  sortable_data = list(map(lambda s: (lower(s), s), data))
  sortable_data.sort()
  return map(lambda s: s[1], sortable_data)

Shane

___
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] case insensitive sorts

2001-01-04 Thread Shane Hathaway

Shane Hathaway wrote:
 def sort_strings(data):
   sortable_data = list(map(lambda s: (lower(s), s), data))
   sortable_data.sort()
   return map(lambda s: s[1], sortable_data)

... Or better, you could pass a comparison function to sort() like Tres
suggested.  :-)

Shane

___
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] RE: objectIds accessiblilty and a proposal

2001-01-04 Thread Brian Lloyd

 snip wishlist
 
 I did have a proposal for just this on dev.zope.org, but I see someone
 has deleted it :-(
 
 cheers,
 
 Chris

Are you talking about 'ProtocolAccessibility'? It's still
there (though Jim has done some rearranging of things there
lately)...


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




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




Re: [Zope-dev] CatalogAware

2001-01-04 Thread Michael Bernstein

Chris Withers wrote:
 
 Erik Enge wrote:
 
  Are you saying that, as a general rule, inheriting from CatalogAware
  and using index_object, reindex_object and unindex_object does not
  work?
 
 It probably does, but if you're a catalog yourself anyway, as Squishdot
 is, it just more overhead rather than calling your own catalog_object
 and uncatalog_object methods ;-)

Aha!

You're saying that catalog_object and uncatalog_object are
methods of the catalog, so when the catalog contains the
objects directly, it's all that's neccessary, correct?

index_object, unindex_object, and reindex_object (the
CatalogAware methods) are all methods on the object to be
indexed, not methods of the catalog, as I understand. When
called, they find the nearest (acquisition-wise) ZCatalog
(named Catalog by default), and cause catalog_object and
uncatalog_object to be called on it (I'm not sure what
method reindex_object causes to be called).

So, postings would only need to be CatalogAware if you
wanted them to be able to 'live' anywhere within the Zope
heirarchy, instead of being contained directly within the
Squishdot object (which inherits from ZCatalog).


Do I have this correct?

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] ZPatterns question

2001-01-04 Thread Christian Scholz

Hi!

  Well, virtual in the sense as a specialist is no real folder but can
  provide content from different sources. Thus what I mean is some mechanism
  which emulates objectIds() etc. so it looks to the user (and the ones
  using it via dtml) like a normal folder object.
  Somehow like the Customizer but without the need for actually creating
  Zope objects. Something inbetween Specialist and Customizer this would be
  I guess.
 
 yeah, this is exactly what I'm after too. I'd like the virtual objects
 the specialist is responsible for to have normal Zope management
 screens.

Well, I think this shouldn't be too difficult to create. Just a subclass
of Specialist and add some Contents-Tab, define objectIds() etc. in the
Methods tab and call it in the management screen of "Contents".
Though the more advanced things like Copy/Paste/Rename might then not
be available.. But for me actually it would be sufficient to get the
contents. 

 Also, much mroe trickily, I'd like them to be able to contain each
 other, although Steve A's __bobo_traverse__ trick might help with this
 bit...

What do you mean? Nesting Specialists (or these virtual folder specialists)?

cheers,
  Christian

-- 
COM.lounge  http://comlounge.net/
communication  design   [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] CatalogAware

2001-01-04 Thread Erik Enge

[Michael Bernstein]

| When called, they find the nearest (acquisition-wise) ZCatalog
| (named Catalog by default),

I think you can specify the ZCatalog it should index itself in by
putting the default_catalog attribute in your class.  

I think, that this object (in pseudo) would index itself in ZCatalog1

def myClass(CatalogAwareness):

default_catalog = 'ZCatalog1'

def __init__(self):
self.index_object()

If you have the path:
mysite.com/ZCatalog1/ZCatalog2/Folder1/myClassInstance

Yeah?

___
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] ZPatterns; possible bug?

2001-01-04 Thread Steve Alexander

I have a specialist "Instructors".

It holds a rack, containing DataSkin-derived ZClasses of meta-type 
"Instructor".

The Instructor class has a DataSkin Attribute propertysheet called 
"Basic", and this has properties for forename, surname, address, areas.

I have some skinscript in the Instructors specialist:


WITH SELF COMPUTE
   name='%s %s' % (forename, surname),
   areas_comma_sep=_.string.join(areas, ','),
   address_lines=_.string.join(address, '\n'),
   address_comma_sep=_.string.join(address, (', '))

WITH SELF COMPUTE
   __roles__=_.None
   # XXX publicly visible!! Nutter!!
   # change __roles__ to ('Operator',) later.

This works fine. The __roles__ bit is a hack to make Zope 2.3 ZCatalog 
play nicely with the Specialist and __bobo_traverse__.

I have some other skinscript that keeps an instructors index in a 
ZCatalog inside Instructors.

WHEN OBJECT ADDED CALL
   Catalog.catalog_object(self, _.string.join(self.getPhysicalPath(),'/'))
WHEN OBJECT DELETED CALL
   Catalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/'))
WHEN OBJECT CHANGED CALL
   Catalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/')),
   Catalog.catalog_object(self, _.string.join(self.getPhysicalPath(),'/'))

This worked fine.

When I changed the first skinscript to make one WITH SELF statement, I 
got some strange inconsistencies:

WITH SELF COMPUTE
   name='%s %s' % (forename, surname),
   areas_comma_sep=_.string.join(areas, ','),
   address_lines=_.string.join(address, '\n'),
   address_comma_sep=_.string.join(address, (', ')),
   __roles__=_.None

On changing an instructor's properties using manage_changeProperties on 
its propertysheet, I'd see the change in the instructor. However, the 
ZCatalog metadata would always have the most recent value for "surname", 
but the last value for "name".

Changing the skinscript back to using two statements makes cataloging 
function normally again.

I could tell when the catalog was doing by instrumenting the recordify 
method of Catalog.py:

 def recordify(self, object):
 """ turns an object into a record tuple """
 print "recordify %s" % (object)
 record = []
 # the unique id is allways the first element
 for x in self.names:
 try:
 attr = getattr(object, x)
 if(callable(attr)):
 attr = attr()

 except:
 attr = MV
 print "  appending %s:%s" % (x, attr)
 record.append(attr)

 return tuple(record)

A typical (wrong) debug output would be:

recordify Instructor instance at 86c16b0
   appending id:instructor-977678608
   appending meta_type:Instructor
   appending bobobase_modification_time:2001/01/04 17:26:01.35408 GMT
   appending name:Bob Collins8
   appending surname:Collins9
   appending areas_comma_sep:M12

This is after changing the surname of the instructor from "Collins8" to 
"Collins9".

The cause of the problem? I don't know. Maybe I'm doing something silly.

I think what is happening in the broken example is that when the zope 
security machinery asks for __roles__, name is also computed. The 
machinery must request __roles__ before changing anything.

After that, surname gets changed. However, changing "surname" only 
invalidates "surname" in the cache; not anything that is computed using 
surname.

At the end of the transaction, when the triggers are called, name is 
already in the dataskin's attribute cache, so it does not get recomputed.

In the working example, when __roles__ is requested, it is in a 
different skinscript statement, so it does not cause "name" to be 
computed. Thus, "name" can be computed freshly after "surname" is set.

Is this behaviour intended, is it a bug, or is it an unimplemented feature?

Thanks.


Oh, almost forgot: ZPatterns-0-4-3b2

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

I


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

2001-01-04 Thread Keith . Larson

Hello,


Has anyone translated a site within Zope ? I have tried the ZBabel
Translation System (http://www.zope.org/Members/TheJester/ZBabel) and
didn't think it did really what I was after.

I need to translate the site into French , German , and Japanese .

I assume the best way is to pull the different languages from a database
via a python external method or just Zmysql

Any help would be appreciated
   
   
   



Keith Larson


___
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] Product dev

2001-01-04 Thread Tim McLaughlin

I'm building a Product in Python and seem to be having some issues with the
new registerClass method of Product registering.  If I build it all fine as
noted in Shane's recent HowTo, the product does not show up in the control
panel.  Then after much other chasing, I make a purposeful syntax error in
the code, and the Product shows up to reflect its brokenness and shows me
the syntax error.  Then when I try to fix the error, and do a restart, the
error still shows as if I had not changed the code.  I checked _many, many_
times, and now the code is different, but Zope seems not to recognize the
changed code in spite of my deletion of the pyc files.

TYA,
Tim

___
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] ghost product

2001-01-04 Thread Tim McLaughlin

In fact (to clarify my preceding problem), when I removed the product
folder, Zope still shows the product and error after restarting.  Am I being
stupid?  I must be missing something

Thanks

___
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] ghost product

2001-01-04 Thread Chris McDonough

Delete the product from the Control Panel management interface.
- Original Message -
From: "Tim McLaughlin" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 3:10 PM
Subject: [Zope-dev] ghost product


 In fact (to clarify my preceding problem), when I removed the product
 folder, Zope still shows the product and error after restarting.  Am I
being
 stupid?  I must be missing something

 Thanks

 ___
 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] ghost product

2001-01-04 Thread Tim McLaughlin


Thanks for the delete issue, however that puts me at ground 0 again.  THis
product will not show up in the products list... here's the __init__.py

import ZSQLTable

def initialize(context):
"""Initialize the ZSQLTable product.
"""
context.registerClass(
ZSQLTable.ZSQLTable,
permission='Add Z SQL Tables',
constructors = (ZSQLTable.manage_addZSQLTableForm,
ZSQLTable.manage_addZSQLTable),
icon = 'zsqltable.gif')

anything look strange?, anything?

TYA

-Original Message-
From: Chris McDonough [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 3:38 PM
To: Tim McLaughlin; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ghost product


Delete the product from the Control Panel management interface.
- Original Message -
From: "Tim McLaughlin" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 3:10 PM
Subject: [Zope-dev] ghost product


 In fact (to clarify my preceding problem), when I removed the product
 folder, Zope still shows the product and error after restarting.  Am I
being
 stupid?  I must be missing something

 Thanks

 ___
 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] ZPatterns; possible bug?

2001-01-04 Thread Phillip J. Eby

At 06:03 PM 1/4/01 +, Steve Alexander wrote:

I think what is happening in the broken example is that when the zope 
security machinery asks for __roles__, name is also computed. The 
machinery must request __roles__ before changing anything.


The behavior is as documented, though I'm not sure I'd call it "intended",
exactly.  :)  You can fix this with either a seperate statement, as you've
noticed, OR by placing the __roles__ computation *first* in the WITH SELF
statement.  This will ensure that it is already computed before the other
items execute.


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




[Zope-dev] Re: [Zope] Lobbying (was: [Zope] html_quote in python methods?)

2001-01-04 Thread Evan Simpson

From: Chris Withers [EMAIL PROTECTED]
  Only if you add security declarations to expose functionality from
  xmlrpclib.

 Is that hacky and nasty? :-S

In Zope 2.3, you place the following code somewhere that it will get
executed at startup (a custom Product's __init__ is the best bet):

from AccessControl import ModuleSecurityInfo
security = ModuleSecurityInfo('xmlrpclib')
security.declarePublic('Server')
# or security.setDefaultAccess(1), if you feel lucky.

Cheers,

Evan @ digicool  4-am


___
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] case insensitive sorts

2001-01-04 Thread Dieter Maurer

Chris Withers writes:
  Dieter Maurer wrote:
   
   Chris Withers writes:
 Andrew
 bart
 David
 sophie
 Wayne
   Why in hell do you switch caseness for similar objects?
  
  Who said anything about objects?
Maybe, I should have said subjects.

Your example strings seem to name persons.
It is very strange (and should be punished, as it is by
Python's default sort ;-)) to use caseness inconsistently
for these same type subjects/objects/entities (whatever you like).

I am not against an option to specify what comparison function should
be used for sorting (when I would implement it, I would probably
follow Python's sort interface and provide an optional function
rather than have a collection of attributes specifying
the sort order).

However, I am against a change of the sort order
in the *management interface* (unless I can easily switch back).
The reason: I make sensible use of the ASCII based sort
order and would not like to loose it.



Dieter

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




Re: [Zope-dev] Product dev

2001-01-04 Thread Dieter Maurer

Tim McLaughlin writes:
  I'm building a Product in Python and seem to be having some issues with the
  new registerClass method of Product registering.  If I build it all fine as
  noted in Shane's recent HowTo, the product does not show up in the control
  panel.  Then after much other chasing, I make a purposeful syntax error in
  the code, and the Product shows up to reflect its brokenness and shows me
  the syntax error.  Then when I try to fix the error, and do a restart, the
  error still shows as if I had not changed the code.  I checked _many, many_
  times, and now the code is different, but Zope seems not to recognize the
  changed code in spite of my deletion of the pyc files.
I have seen this several times:

  For some problems during product import, Zope
  decides to keep the old state rather than show
  the error.

This is *very* confusing.

If you have a sufficiently recent Zope version
(I think, at least Zope 2.2.2), then enabling
the "stupid logging mechanism" should give
you an error indication in the log file.

You activate this logging through a parameter:

STUPID_LOG_FILE=zope.log

for your start script.


Dieter

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




Re: [Zope-dev] Product dev

2001-01-04 Thread Shane Hathaway

Dieter Maurer wrote:
   For some problems during product import, Zope
   decides to keep the old state rather than show
   the error.

I wonder whether the product's version.txt might have something to do
with it.  Remove version.txt and see if it has any effect.  Then try
creating a new version.txt.

Another thing to watch out for is file permissions.  "chmod -R 777
productname"  and see if there's any difference.

Are you running Zope in "-D" debug mode and watching the output?  I
can't imagine debugging products in normal mode.  Note, however, that
Zope 2.1.7 and before don't even show anything in the terminal window
when a product has syntax errors.  One of the first things I did at
Digital Creations was make sure that got fixed. :-)

Shane

___
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] Hacking Splitter.c

2001-01-04 Thread Jason Spisak

Hello,

I have been hard at work implementing version 2.0 of our Zope based CRM
software.  I need a bit of help figuring out Splitter.c
(lib/python/SearchIndex/Splitter.c) I have commented out both the parts
that don't index numbers and single letter words.  The numbers seem to be
indexing fine, but the single letter words are not. :(  My goal is to be
able to find 'C' and 'C++' in a TextIndex search.  Can anyone tell me why
'+' doesn't get indexed, and where to change that? 'C' isn't in the Lexicon
stop words, and neither is the '+'.  Thanks in advance.

All my best,


Jason Spisak
CIO
__ ___   ____
   / // (_)_/_  __/__ / /  ___  ___  __ _
  / _  / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/  ' \
 /_//_/_/_/  \__/_/  \__/\__/_//_/___(_)__/\___/_/_/_/

6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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

2001-01-04 Thread Michael Bernstein

Erik Enge wrote:
 
 [Michael Bernstein]
 
 | When called, they find the nearest (acquisition-wise) ZCatalog
 | (named Catalog by default),
 
 I think you can specify the ZCatalog it should index itself in by
 putting the default_catalog attribute in your class.

Your example is correct as far as it goes, but as I
understand it, you are not really specifying the default
catalog per se, but the default catalog *name*. Therefore,
it will then look for the nearest catalog of the name that
you have redefined as the default.

So if you redefine it to be ZCatalog1, and you have the
following structure:

/
|-/Catalog
|
|-/ZCatalog1
|
|-/folder1
|  |
|  |-/folder1/ZCatalog1
|
|-/folder2

Assuming a CatalogAware ZClass has had it's default_catalog
defined to be 'ZCatalog1', and that an instance of this
ZClass is then added in /folder2, it will index itself in
/ZCatalog1, whereas an instance that is added in /folder1
will index itself in /folder1/ZCatalog1.

This is my current understanding, I apologise if what I've
said is incorrect.

HTH,

Michael Beernstein.

___
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] ghost product

2001-01-04 Thread Chris McDonough

If you set the environment variable STUPID_LOG_FILE to a file path before
starting Zope, you will be able to capture the debug output from the product
import procedure in that file.  This usually has useful information in it
about product registration failures.

- Original Message -
From: "Tim McLaughlin" [EMAIL PROTECTED]
To: "'Chris McDonough'" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 3:35 PM
Subject: RE: [Zope-dev] ghost product



 Thanks for the delete issue, however that puts me at ground 0 again.  THis
 product will not show up in the products list... here's the __init__.py

 import ZSQLTable

 def initialize(context):
 """Initialize the ZSQLTable product.
 """
 context.registerClass(
 ZSQLTable.ZSQLTable,
 permission='Add Z SQL Tables',
 constructors = (ZSQLTable.manage_addZSQLTableForm,
 ZSQLTable.manage_addZSQLTable),
 icon = 'zsqltable.gif')

 anything look strange?, anything?

 TYA

 -Original Message-
 From: Chris McDonough [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 04, 2001 3:38 PM
 To: Tim McLaughlin; [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] ghost product


 Delete the product from the Control Panel management interface.
 - Original Message -
 From: "Tim McLaughlin" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 04, 2001 3:10 PM
 Subject: [Zope-dev] ghost product


  In fact (to clarify my preceding problem), when I removed the product
  folder, Zope still shows the product and error after restarting.  Am I
 being
  stupid?  I must be missing something
 
  Thanks
 
  ___
  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 )




___
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] Python Scripts update

2001-01-04 Thread Evan Simpson

Python Scripts have gone through a fair number of changes and bugfixes
recently.  They should now work properly as methods of ZClasses.  When you
download the source of a Python Script, the title, parameter list, and
bindings are added to the source in the form of specially formatted
comments.  If source with these comments is uploaded or pasted into a Python
Script, it will properly set the properties mentioned in the comment block.
The default bindings have been changed to be more sensible.

If you want to give Python Scripts a try, you can go to
http://ps.4-am.com:9000/ , pick a password, and you'll get your own private
area in a trunk CVS checkout of Zope in which to play.

I promised examples when I first announced this site, and haven't gotten
around to writing any.  If you have created a script or set of objects on
the demo site that you would like to share as an example, please mail me the
URL.

Cheers,

Evan @ digicool  4-am



___
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] Login dialog - another newbie question

2001-01-04 Thread Michal Krejza

Hi Zopitas,
I have problem with authentication in Zope. I made small site in our
company, and some informations are visible for anonymous user and some for
managers. So I need to authorize users before they connect to restricted
area. It's late for me, becose access to restricted methods is able through
links, which are visible only for managers. Is there any way to make some
form for login to Zope. But without another application like LoginManager or
MySQL User Folder and etc. My Zope server is running on WinNT and I have
problem with these application.

Michal Krejza

When users connect to a restricted area a dialog box pops up that
 looks more or less like 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] Non-ASCII-form-input - HTML-entities?

2001-01-04 Thread Markus Kemmerling

Thanks for your answers!

I am looking forward for Unicode-Zope, but for now the solution proposed by D. Maurer 
is sufficient for me. (I suppose it is equally good to insert a Content-Type meta-tag 
in the standard_html_header?)
This one line doesn't hurt, although W. Strobl seems to be right, especially taking 
into account the following 2 statements in RFC 2616:

'Some HTTP/1.0 software has interpreted a Content-Type header without charset 
parameter incorrectly to mean "recipient should guess."'

but also:

'Unfortunately, some older HTTP/1.0 clients did not deal properly with an explicit 
charset parameter.'

I encountered these problems especially on the Mac (up to Netscape 3, as far as I can 
remember). But as it seems, the time to care about this misbehaviour is over now.

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] ZBabel translation to Postgres

2001-01-04 Thread Olaf Zanger

Hi there,

i'm using ZPyGreSQL successfully for my database. To keep it simple i
don't want to use MySQL for ZBabel. 

ZBabel though uses some MySQL specific syntax which i am unsuccessfully
translating to PostgreSQL syntax:
Description "md5Hash" are the same fore entries with different "lang"
fields. They are used to translate depending on selected language.

SELECT 
Phrases.* 

FROM 
Phrases 

LEFT JOIN 
Phrases as b 

ON 
Phrases.md5Hash = b.md5Hash AND Phrases.lang  b.lang

WHERE 
b.md5Hash is NULL AND Phrases.lang=dtml-sqlvar srcLang type=nb

What does the whole thing do anyway?
How can you join "Phrases.md5Hash = b.mdf5Hash", while "md5Hash is
NULL"?
What is different in the LEFT JOIN ... ON ... statement to a normal
WHERE clause?
My try for translation to PostgreSQL (which I assume is completely
ignorant):

SELECT 
Phrases.* 

FROM 
Phrases as b

WHERE 
Phrases.md5Hash *= b.md5Hash AND Phrases.lang  b.lang AND

b.md5Hash is NULL AND Phrases.lang=dtml-sqlvar srcLang type=nb


Has anybody ported ZBabel already? 
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] Core Session Tracking kudos namespaces

2001-01-04 Thread Chris Withers

Chris McDonough wrote:
 
 So the question becomes: do we want DTML namespace lookup magic or no DTML
 namespace lookup magic for names that we attempt to look up in a session
 data object?  I don't know the answer.  I'm so sick of magic at this point
 that I'm apt to vote "no", but if it affords us some provable real-world
 benefits, I could change this vote.  If someone would be kind enough to give
 me an example where having DTML namespace lookup magic for names out of a
 session data object would be very useful, I'd consider it carefully.

Well, if you want to get something from the session, but it might not be
there and you want to fall back to somethign that was submitted on the
form or, more likely, is a property of some other object and hence
acquirable.

Of course, the best solution would be for the 'magic' lookup to be
optional...

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] case insensitive search?

2001-01-04 Thread Chris Withers

Andy McKay wrote:
 
 The checkbox is good, but surely the patch should be in presentation layer
 (dtml-in) and not just in Find Support. My patch fixes it throughout Zope...

Hangon... I think this is case insensitive search, not sort ;-)

eg: when searching for 'fIsh', that would return objects containing
'fish', 'fIsh' and 'fiSH'.

Not sure how your patch helps here, but I'm probably being stupid :-)

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] Core Session Tracking kudos namespaces

2001-01-04 Thread Phil Harris

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]
Cc: "Dieter Maurer" [EMAIL PROTECTED]; "Bob Sidebotham"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 9:57 AM
Subject: Re: [Zope] Core Session Tracking kudos  namespaces


 Chris McDonough wrote:
 
  So the question becomes: do we want DTML namespace lookup magic or no
DTML
  namespace lookup magic for names that we attempt to look up in a session
  data object?  I don't know the answer.  I'm so sick of magic at this
point
  that I'm apt to vote "no", but if it affords us some provable real-world
  benefits, I could change this vote.  If someone would be kind enough to
give
  me an example where having DTML namespace lookup magic for names out of
a
  session data object would be very useful, I'd consider it carefully.

 Well, if you want to get something from the session, but it might not be
 there and you want to fall back to somethign that was submitted on the
 form or, more likely, is a property of some other object and hence
 acquirable.

seconded.  This would come in most handy right now for me.


 Of course, the best solution would be for the 'magic' lookup to be
 optional...

That'd also be cool.


 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 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] ZBabel translation to Postgres

2001-01-04 Thread Phil Harris

Olaf,

The left join is a notation that says to get all records from the left hand
side of the join and only those records where the criteria matches from the
right hand side.

It is btw a part of most RDBMS engines I've ever used, so it's not that
unusual a syntax.

You can also do something similar by using unions.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Olaf Zanger" [EMAIL PROTECTED]
To: "Zope Mailinglist" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 9:50 AM
Subject: [Zope] ZBabel translation to Postgres


 Hi there,

 i'm using ZPyGreSQL successfully for my database. To keep it simple i
 don't want to use MySQL for ZBabel.

 ZBabel though uses some MySQL specific syntax which i am unsuccessfully
 translating to PostgreSQL syntax:
 Description "md5Hash" are the same fore entries with different "lang"
 fields. They are used to translate depending on selected language.

 SELECT
 Phrases.*

 FROM
 Phrases

 LEFT JOIN
 Phrases as b

 ON
 Phrases.md5Hash = b.md5Hash AND Phrases.lang  b.lang

 WHERE
 b.md5Hash is NULL AND Phrases.lang=dtml-sqlvar srcLang type=nb

 What does the whole thing do anyway?
 How can you join "Phrases.md5Hash = b.mdf5Hash", while "md5Hash is
 NULL"?
 What is different in the LEFT JOIN ... ON ... statement to a normal
 WHERE clause?
 My try for translation to PostgreSQL (which I assume is completely
 ignorant):

 SELECT
 Phrases.*

 FROM
 Phrases as b

 WHERE
 Phrases.md5Hash *= b.md5Hash AND Phrases.lang  b.lang AND

 b.md5Hash is NULL AND Phrases.lang=dtml-sqlvar srcLang type=nb


 Has anybody ported ZBabel already?
 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


___
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: ZBabel translation to Postgres

2001-01-04 Thread Andrew Kenneth Milton

+---[ Olaf Zanger ]--
| Hi there,

...

| What does the whole thing do anyway?

Finds all the phrases that don't have a translation for the language
selected. It's hard to find things that don't exist in databases without
nested selects which MySQL did not have at the time.

MySQL was chosen precisely because it is restricted, and is basically the 
lowest common denominator when it comes to SQL.

I do recall however, that postgres only implements INNER and OUTER joins
although I don't know the status of the JOIN stuff in postgres at this time.

| Has anybody ported ZBabel already? 

Someone was going to send me patches for postgres, but, I never received
them.

I'll happily integrate patches, although, automatically selecting the
right query based on database type will be required so that several releases
aren't required. I don't think that that's a hard thing to achieve.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[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] Re: ZBabel translation to Postgres

2001-01-04 Thread Oleg Broytmann

Hi!

On Thu, 4 Jan 2001, Andrew Kenneth Milton wrote:
 I do recall however, that postgres only implements INNER and OUTER joins
 although I don't know the status of the JOIN stuff in postgres at this time.

   AFAIR they (especially Bruce Momjian) always suggested ti emulate LEFT JOIN
with UNION. They said it'd pretty easy...

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 )




[Zope] sqlgroup problems

2001-01-04 Thread Dario Lopez-Kästen

Hello!

I need help with the following SQL-method, which I don't know if it is a
bug, or if it is my mistake.

I am building a search interface to a database (Zope 2.2.4 w all HF's,
Oracle 8.1.7, Solaris), and I want to use the following sqlmethod, to let
the user enter any combination of search parameters, including none:

select * from ladok.kurs
dtml-sqlgroup where
  dtml-sqltest kurs_kod column="kod"
   op="like" type="string" optional
dtml-and
  dtml-sqltest kurs_namn column="benamns"
   op="like" type="string" optional
/dtml-sqlgroup

From the Zope Book, Chapter 10, I got the impression that the "optional"
part of the sqltest tag would render the parts that where not null; i.e. if
I only specify the kurs_namn variable (first sqltest), the method would
render the following SQL:

  select * from ladok.kurs
  where
  (kod like 'XX')

or, if no search parameters where specified, it would render the following
SQL:

  select * from ladok.kurs

However this is not the case, what I get if I enter XX for kurs_kod is the
following SQL:

select * from ladok.kurs
where
(kod like 'XX'
 and benamns like ''
)

Is this expected behaviour or have I misunderstood the docs? I can get
around this problem by doing something like this (notice the op tag and the
extra ",'%')" string at the end of each sqltest line) :

  dtml-sqltest kurs_kod column="kod"
   op="like nvl(" type="string" optional, '%')

which renders the following SQL (the "%" is the Oracle wildcard operator):

select * from ladok.kurs
where
(kod like nvl( 'XX', '%')
 and benamns like nvl( '', '%')
)

however, i'd much rather that it didn't render the null variables at all.

If this is known behaviour then the examples in Chapter 10

Any help appreciated. I searched the archives but didn't find any answers,

TIA,

/dario

- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services


___
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: ZBabel translation to Postgres

2001-01-04 Thread Albert Langer

The following references from search of huge numbers for "left join" at
www.postgresql.org may be helpful:

http://www.postgresql.org/mhonarc/pgsql-sql/2000-03/msg00023.html

http://www.postgresql.org/mhonarc/pgsql-hackers/2000-12/msg00634.html

http://www.postgresql.org/mhonarc/pgsql-hackers/2000-12/msg00656.html

http://www.postgresql.org/mhonarc/pgsql-general/2000-12/msg00194.html

Summary:

1) Easy to work around
2) There was a bug
3) It's been fixed
4) Comprehensive implementation in 7.1(devel)

Many more messages not looked at so above summary may be wrong

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Andrew Kenneth Milton
Sent: Thursday, January 04, 2001 9:59 PM
To: Olaf Zanger
Cc: Zope Mailinglist; [EMAIL PROTECTED]
Subject: [Zope] Re: ZBabel translation to Postgres


+---[ Olaf Zanger ]--
| Hi there,

...

| What does the whole thing do anyway?

Finds all the phrases that don't have a translation for the language
selected. It's hard to find things that don't exist in databases without
nested selects which MySQL did not have at the time.

MySQL was chosen precisely because it is restricted, and is basically the
lowest common denominator when it comes to SQL.

I do recall however, that postgres only implements INNER and OUTER joins
although I don't know the status of the JOIN stuff in postgres at this time.

| Has anybody ported ZBabel already?

Someone was going to send me patches for postgres, but, I never received
them.

I'll happily integrate patches, although, automatically selecting the
right query based on database type will be required so that several releases
aren't required. I don't think that that's a hard thing to achieve.

--
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   |
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[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] Why pythonMethod forbids me cutting list?

2001-01-04 Thread Dirksen

These statements in python method:

stock=[3,4]
del stock[1]

will cause this error:

Error Type: Python Method Error
Error Value: Forbidden operation DELETE_SUBSCR at line 2

How is that?

Dirksen



__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] Problem with SiteAccess

2001-01-04 Thread Leonardo Graf


It sounds like your SiteRoot object doesn't have "Base" (aka the
Base URL) set correctly.

It should be set to:
http://www.somesite.com

The SiteAccess Rule is only needed if you have *multiple* hosts
served out from one host.  You sound like you only have one.

Ciao!

--
There is no sweeter sound than the crumbling of your fellow man.
 -- Groucho Marx

The Doctor What: A really hip dude   http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

Thanks for the answer, but the base is set correctly to 
http://www.somesite.com and the path to / so I'm really a bit lost here. 
One possibility I considered is setting the base 
href="http://www.somesite.com" tag in the header of my pages, but in that 
case I don't need the SiteRoot anymore...

By the way, I probably want to serve multiple hosts from one later on, so 
it would be nice to have an example of a SiteAccess rule.

Thanks and regards, Leonardo Graf



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




Re: [Zope] Problem with SiteAccess

2001-01-04 Thread Leonardo Graf

At 13:13 03.01.01 -0600, you wrote:
* Leonardo Graf ([EMAIL PROTECTED]) [010103 09:16]:
  Hello,
 
  I'm trying to use the SiteAccess Product as discribed in the HowTo: Using
  Apache with ZServer (NOT Zope.cgi). Unforunately things don't work as
  described.
 
  My ZServer is listening on www.myserver.com:9080/somesite. I would like to
  be able to access the ZServer through apache via the URL www.somesite.com
  (to do virtual hosting).
 
  The ProxyPass directives work well (the pages get served properly), but 
 the
  URL's in my pages still contain the complete URL's of the ZServer, like
  img src="http://www.myserver.com:9080/somesite/images/some.gif" instead
  of img src="http://www.somesite.com/images/some.gif". The same is true
  for normal links. Ok, it's not so bad, things work (no broken links), but
  it is a little bit ugly. I thought the SiteAccess Product should handle
  these problems, by putting a SiteRoot object in the somesite folder.
 
  Or do I have to write an AccessRule ? And how would that look like ?
 
  Thanks a lot, regards, Leonardo Graf

It sounds like your SiteRoot object doesn't have "Base" (aka the
Base URL) set correctly.

It should be set to:
http://www.somesite.com

The SiteAccess Rule is only needed if you have *multiple* hosts
served out from one host.  You sound like you only have one.

Ciao!

--
There is no sweeter sound than the crumbling of your fellow man.
 -- Groucho Marx

The Doctor What: A really hip dude   http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

Funny, I just restarted my ZServer and now everything works like magic, 
perhaps I should do that more often... sorry for the inconvenience,

Regards, Leonardo Graf



___
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] ZBabel translation to Postgres

2001-01-04 Thread Olaf Zanger

hi andrew,

thanks for the description. i figured it as far as that:

you need in postgresql (this is tested only from zope with zsql method,
since some other things don't work in the ZBabel Produkt with
postgresql):

sqlGetPhrasesToUpdate:
 
select distinct Phrases.*

WHERE md5Hash not in 
(
 select c.md5Hash
 from Phrases as c, Phrases as d
 where c.md5Hash = d.md5Hash and c.lang  d.lang and c.lang='dtml-var
srcLang'
)
and lang 'dtml-var srcLang'

sqlNewPhrase:

insert into Phrases (phrase_id,lang,md5Hash,renderPath,renderText)
values (
nextval('phrases_phrase_id_seq'),
dtml-sqlvar lang type=nb,
dtml-sqlvar md5Hash type=nb,
dtml-sqlvar renderPath type=nb,
dtml-sqlvar renderText type=nb
)

all other sqlFunctions seam to work (out of zope ZSQL method)

i attache the ZBabel.sql for postgres.
the examples are handgenerated so the hashes are fake.

TAKE CARE 
until now this just fakes the ability of ZBabel on Postgres on a ZSQL
Method level for testing purposes.

I get errors:
when i first want to view a page with the dtml-babel src=uk dst=de
test/dtml-babel

pg.error
error value: error: attribute 'phrases_phrase_id_seq' not found


probably that helps anybody

olaf



 | What does the whole thing do anyway?
 
 Finds all the phrases that don't have a translation for the language
 selected. It's hard to find things that don't exist in databases without
 nested selects which MySQL did not have at the time.
 
 MySQL was chosen precisely because it is restricted, and is basically the
 lowest common denominator when it comes to SQL.
 
 I do recall however, that postgres only implements INNER and OUTER joins
 although I don't know the status of the JOIN stuff in postgres at this time.
 
 | Has anybody ported ZBabel already?
 
 Someone was going to send me patches for postgres, but, I never received
 them.
 
 I'll happily integrate patches, although, automatically selecting the
 right query based on database type will be required so that several releases
 aren't required. I don't think that that's a hard thing to achieve.

-- 
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
 phrases.sql

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] ZBabel translation to Postgres

2001-01-04 Thread Olaf Zanger

hi Phil,

 The left join is a notation that says to get all records from the left hand
 side of the join and only those records where the criteria matches from the
 right hand side.
 
 It is btw a part of most RDBMS engines I've ever used, so it's not that
 unusual a syntax.
 
 You can also do something similar by using unions.
thanks a lot for that,

do you have any suggestion (principally) how this union would look like

thanks

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] Question on __roles__

2001-01-04 Thread Cees de Groot

Chris Withers [EMAIL PROTECTED] said:
 As this is such a core piece of Zope, it seems quite unlikely to me
 that I found a bug here (although an older version of ZPublisher does
 check object instead of subobject). The only thing I can think of is
 that Acquisition should work for the getattr() and somehow I managed
 to disable Acquisition on these instances.

This sounds like a bug to me. I've had very similar problems to this
with Squishdot.


An extra data point: it really seems to be a bug. I've applied the patch
to our servers (development and production), and the only different behavior
I can see is that a folder that is protected by a mysqlUserFolder acl_users
now denies be access when trying to access the folder, instead of trying
to access one of the objects within the folder. And that seems to be
better behavior to me, too. 

-- 
Cees de Groot   http://www.cdegroot.com [EMAIL PROTECTED]
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B

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




Re: [Zope] Zope Projects in NL/Europe?

2001-01-04 Thread Cees de Groot

Jonathan [EMAIL PROTECTED] said:
Just wondering: are there any Zope projects are available in the
Netherlands/Benelux/Europe? We did one last year but they seem hard to
find. Are there commercial projects available or is Zope mostly used on
internal projects? Is there any demand for Zope expertise around here?

We are using Zope and could use an extra pair of hands. We're an ISP, and
use Zope for our own development work (backoffice stuff, domain management
for customers, etcetera).

-- 
Cees de Groot   http://www.cdegroot.com [EMAIL PROTECTED]
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B

___
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 many users

2001-01-04 Thread Ragnar Beer

Howdy Zopistas and happy new year!

I need to add about 150 users to an acl_users folder and I wouldn't 
like to do it manually since the data already exists in a python 
list. What would be an elegant way to add them all with a python 
script?

Ragnar

___
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] ZDP:Search is bringing up DISNEY.GO.COM !!!Hacked??

2001-01-04 Thread Sven Hohage

Hello,
is the portal being hacked??
When you search on zdp.zope.org you are led to .

 
http://disney.go.com/park/homepage/today/flash/index.html?clk=1004398


...hmmh..better than PLAYBOY.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] WIN2k batch problem

2001-01-04 Thread Phil Harris

The only thing I could think of is that the output is getting piped to more
or similar!?

Phil

- Original Message -
From: "Robin Becker" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 12:54 PM
Subject: [Zope] WIN2k batch problem


 I'm trying to run Zope 2.2.2 under win2000 in a batch file. I'm just
 watching error messages and prints. I find that when zope has written a
 page to the cmd.exe window it locks further prints from python until I
 hit a key in the window and then it releases another page full. Is there
 a Win NT/2K guru who knows about such things and how to prevent this?
 --
 Robin Becker

 ___
 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] Using a multiple_selection property in a product

2001-01-04 Thread Ronald L. Roeber

Randall,
 Thank you very much. Exactly right.!Thanks for taking the time to help.

"Randall F. Kern" wrote:

 Try this:

 _properties = (
 {'id':'classdays', 'type':'multiple selection','mode':'w',
 'select_variable': 'days'},
 ...)

 days = (
 'Monday',
 'Tuesday',
 'Wednesday',
 'Thursday',
 'Friday'
 )

 -Randy

 -Original Message-
 From: Ronald L. Roeber [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 03, 2001 2:48 PM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Using a multiple_selection property in a product

 I am attempting to build a product that will contain some unique
 information ...



___
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: manage_addFile problem

2001-01-04 Thread Ian Sealy

Dear all,

I sent the following message to the list just before Christmas, but
didn't get any replies. I've tried changing the admin_addfiles method
to:

  dtml-call expr="manage_addFile(filename, file='', title=filetitle)"
  dtml-let newfile="_.getitem(filename)"
  dtml-call expr="newfile.manage_upload(file)"
  dtml-call expr="newfile.manage_addProperty('author', fileauthor, 'string')"
  dtml-call expr="newfile.manage_addProperty('maintainer', filemaintainer, 'string')"
  dtml-call expr="newfile.manage_addProperty('description', filedescription, 
'string')"

but I still get the same error. Has anyone got any advice? I can't see
how this is different from adding a file using the management screens.

 I've got a really simple little Zope application that allows staff here
 to upload documents into a folder of their choice without seeing the
 Zope management screens. There's a form that looks like this:
 
   form action="admin_addfiles" method="POST" enctype="multipart/form-data"
   input type="file" name="file" size="40"
 etc...
 
 The admin_addfiles method then actually creates the file and applies
 some properties to it (that also come from the form):
 
   dtml-call expr="manage_addFile(filename, file=file, title=filetitle)"
   dtml-let newfile="_.getitem(filename)"
   dtml-call expr="newfile.manage_addProperty('author', fileauthor, 'string')"
   dtml-call expr="newfile.manage_addProperty('maintainer', filemaintainer, 
'string')"
   dtml-call expr="newfile.manage_addProperty('description', filedescription, 
'string')"
   /dtml-let
 
 It all works fine until I try to upload a file that's greater than about
 128 kb. When I try that I get the following error:
 
 Error Type: AttributeError
 Error Value: abort_sub
 
 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
 (Object: Traversable)
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in publish
   File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
   File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
 AttributeError: (see above)
 
 I don't see this if I add a similar-sized file using the Zope management
 screens. Anyone done anything similar and seen this?

Cheers,
Ian


___
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] Deleting Connection that hangs Zope

2001-01-04 Thread Spicklemire, Jerry

Hi Zope Fans,

Has anyone found a good way to delete a Database Connection that hangs Zope
at startup? The connection seems to be waiting "forever", and so there is no
access to the Zope interface, so of course I can't delete, or disable the
offending object.

If there were just a way to set it to not connect immediately, prior to
startup, that should be sufficient. The general question is, "How do you
access a Zope Object, without running Zope?"

BTW, I take back everything I said about RDBMS Storages being superfluous .
. .

Thanks,
Jerry S.

___
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] Is it possible to install the Bug Collector Product in my Zope ???

2001-01-04 Thread Frederic Quin

Hi all,

I can't find the bug collector product to install it in my zope. Maybe it's not 
possible... If it is, please tell me where to download it.

Frederic



___
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] Why pythonMethod forbids me cutting list?

2001-01-04 Thread Evan Simpson

From: Dirksen [EMAIL PROTECTED]
 These statements in python method:

 stock=[3,4]
 del stock[1]

 will cause this error:

 Error Type: Python Method Error
 Error Value: Forbidden operation DELETE_SUBSCR at line 2

 How is that?

Python Methods aren't smart enough to know that you created the list
yourself, and there's no security risk in allowing you to alter it.  Python
Scripts remove this limitation.

Cheers,

Evan @ digicool  4-am


___
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] Python script / python method problem

2001-01-04 Thread Lothar T.E.L.

Hello!

I am having a problem with one of the examples in Chapter 12 of the Zope 
book. I am creating a new product called "Zoo Exhibit" comprising of a DTML 
method, a Python script and, of course, a factory.

http://www.zope.org/Members/michel/ZB/CustomZopeObjects.html  just under 
Fig 12.2 details the example.

I have a DTML method sending "id" and "title" to a Python method/script.
I am told to create a "Python Script". I assume this is done by creating a 
"Python Method"?

This is the script I am told to create:

def add(self, container, id, title, REQUEST=None):
"""
Copy the exhibit template to the calling folder.
"""
exhibit=self.manage_clone(container.exhibitTemplate, id)
exhibit.manage_changeProperties(title=title)
if REQUEST is not None:
return self.manage_main(self, REQUEST)

Should this be the entire body of the method or do the parameters need to be 
listed AGAIN in the "parameter list"?

When I add my new Zoo Exhibit product it calls the DTML method and I can 
insert the data as required but when submitted it does not do ANYTHING.

What I am asking is: Exactly what is added to the parameter list, method 
body  title of the newly created Python method?

Thanks in advance!
_
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 )




Re: [Zope] WIN2k batch problem

2001-01-04 Thread Robin Becker

In article 002b01c0765d$cc54cec0$[EMAIL PROTECTED], Phil Harris
[EMAIL PROTECTED] writes
The only thing I could think of is that the output is getting piped to more
or similar!?

Phil

...
seems like it's only with .bat, I turned it into a .cmd and it's ok now.
-- 
Robin Becker

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




Re: [Zope] Problem with SiteAccess

2001-01-04 Thread The Doctor What

* Leonardo Graf ([EMAIL PROTECTED]) [010104 06:42]:
 By the way, I probably want to serve multiple hosts from one later on, so 
 it would be nice to have an example of a SiteAccess rule.

Here is a messy one.  There is another with the SiteAccess2
documentation someplace...

http://docwhat.gerf.org:9673/siteid/view_source

Ciao!

-- 
"Apparently if you play the Windows NT CD backwards you hear satanic

The Doctor What: Need I say more?http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

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




[Zope] Zope redirecting manage_workspace?!

2001-01-04 Thread Edmund Goppelt

I've created a simple news item ZClass.  When I attempt to manage a
News Item instance, I get the default view (or whatever happens to be
the first method listed in the ZClass 'Views' tab) instead of the
usual management interface with properties, undo, view etc.  

Sniffing the http conversation shows that the folder's management
interface is calling manage_workspace on the news item as it should,
but that Zope is redirecting the web browser to index_html.  Why is
this happening and how do I fix it?

Here's what happens when I click on the instance in the management screen:

GET /Z/testfolder/manage_main HTTP/1.0
Referer: http://www.xyz.org/Z/testfolder/manage_main
Connection: Keep-Alive
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-3 i686)
Host: www.spado.org
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Authorization: Basic Z29wcGVsdDpibG9ydDJ1
Cookie: tree-s="eJyLjlZ3hAKX8kBbdR2F6NjYWABEjQYU"; tree-s="eJyLjlZ3hANPW/XYWAAtiQTP"; 
dtpref_rows="20"; dtpref_cols="75"

HTTP/1.0 200 OK
Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1
Date: Thu, 04 Jan 2001 16:04:01 GMT
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 12486

...Bunch of stuff deleted

TR
  TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16"
  INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="computer"
  /TD
  TD ALIGN="LEFT" VALIGN="TOP"
/TD
  TD ALIGN="LEFT" VALIGN="TOP"
  A HREF="computer/manage_workspace"
  computer (My Computer Title)  /A
/TD
/TR

So my client asks Zope to manage_workspace the news item...

GET /Z/testfolder/computer/manage_workspace HTTP/1.0
Referer: http://www.xyz.org/Z/testfolder/manage_main
Connection: Keep-Alive
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-3 i686)
Host: www.spado.org
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Authorization: Basic Z29wcGVsdDpibG9ydDJ1
Cookie: tree-s="eJyLjlZ3hAKX8kBbdR2F6NjYWABEjQYU"; tree-s="eJyLjlZ3hANPW/XYWAAtiQTP"; 
dtpref_rows="20"; dtpref_cols="75"

And Zope redirects!  Why?

HTTP/1.0 302 Moved Temporarily
Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1
Date: Thu, 04 Jan 2001 16:04:06 GMT
Bobo-Exception-File: /usr/local/zope/2-2-2/lib/python/App/Management.py
Bobo-Exception-Type: Redirect
Connection: Keep-Alive
Location: http://www.spado.org/Z/testfolder/computer/index_html
Bobo-Exception-Value: http://www.spado.org/Z/testfolder/computer/index_html
Content-Length: 0
Bobo-Exception-Line: 152

GET /Z/testfolder/computer/index_html HTTP/1.0
Referer: http://www.xyz.org/Z/testfolder/manage_main
Connection: Keep-Alive
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-3 i686)
Host: www.spado.org
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Authorization: Basic Z29wcGVsdDpibG9ydDJ1
Cookie: tree-s="eJyLjlZ3hANPW/XYWAAtiQTP"; dtpref_rows="20"; dtpref_cols="75"

HTTP/1.0 200 OK
Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1
Date: Thu, 04 Jan 2001 15:14:56 GMT
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 162

htmlhead/head
bigbigbEd's Headline/b/big/bigbr

bPosted by goppelt /b

   bSaturday, 01/01/00/b
   b(computer)/b
   br
   
p



-- 

Ed Goppelt
SPADO President
http://www.spado.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] case insensitive search?

2001-01-04 Thread Andy McKay

No im being stupid and did a replace of sort for search in my caffeine
deprived brain.
--
  Andy McKay, Developer.
  ActiveState.


- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: "Aleksander Salwa" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 2:00 AM
Subject: Re: [Zope] case insensitive search?


 Andy McKay wrote:
 
  The checkbox is good, but surely the patch should be in presentation
layer
  (dtml-in) and not just in Find Support. My patch fixes it throughout
Zope...

 Hangon... I think this is case insensitive search, not sort ;-)

 eg: when searching for 'fIsh', that would return objects containing
 'fish', 'fIsh' and 'fiSH'.

 Not sure how your patch helps here, but I'm probably being stupid :-)

 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Python script / python method problem

2001-01-04 Thread Evan Simpson

From: Lothar T.E.L. [EMAIL PROTECTED]
 I am having a problem with one of the examples in Chapter 12 of the Zope
 book. I am creating a new product called "Zoo Exhibit" comprising of a
DTML
 method, a Python script and, of course, a factory.

The Zope book examples are based on Zope 2.3, which includes classes (such
as Python Scripts) and behaviors that do not exist in prior versions.  Zope
2.3 is currently in alpha testing, and is available through CVS.

 I have a DTML method sending "id" and "title" to a Python method/script.
 I am told to create a "Python Script". I assume this is done by creating a
 "Python Method"?

Python Scripts supersede Python Methods, and behave somewhat differently.

Cheers,

Evan @ digicool  4-am


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




[Zope] Re: Zope.org feedback

2001-01-04 Thread Dan L. Pierson

Zachery Bir [EMAIL PROTECTED] writes:

 URL: http://www.zope.org/Members/dlpierson/sqlLogin
 Read through and completed the HOWTO for LoginManager with 
 SQL and SkinScript. I have one question: Is there a missing 
 step between creating the ZClass and somehow accessing it 
 in the test folder?

Yes there is a missing step.  You need to go into the Storage tab of
your UserSource (in acl_users, click the UserSource tab, then click on
the only UserSource, then click on the Storage tab).  Then select your
new ZClass as the "Class to use for stored items" and set "Objects
are:" to "loaded by accessing attribute" 'member_id'.

Thanks for the bug report!  I'll add this to the HOWTO soon.

Dan Pierson

___
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] ZDP:Search is bringing up DISNEY.GO.COM !!!Hacked??

2001-01-04 Thread Maik Röder

Hi !

Sven Hohage wrote:
 
 Hello,
 is the portal being hacked??
 When you search on zdp.zope.org you are led to .
 
 
 http://disney.go.com/park/homepage/today/flash/index.html?clk=1004398
 
 ...hmmh..better than PLAYBOY.COM

Mmmh well, now everyone stays on the ZDP site :-)

Best regards,

Maik Röder

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




Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?

2001-01-04 Thread Oliver Bleutgen

   Some databases convert them to uppercase!
   Oracle is a prominent example!

   It took me once some ours to locate a bug resulting
   from this "feature".

This reminds me of another post I did some time before, but
where nobody replied.

Shouldn't tags for creating sql-statements in ZSQL
(like dtml-sqltest) quote the variables by default in order
to prevent unexpected conversions by the database?

I had to patch Zope in order to be able do queries on
a postgres db with capital column-names, because postgres 
converts all unquoted columnnames to lowercase.


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] LinuxWorld Expo Exhibits pass from Digital Creations and Zope.org

2001-01-04 Thread Gary Graham

Come join Digital Creations, publishers of Zope, as our guest at the Linux World 
Conference  Expo exhibits!  The show is January 31-February 2 at the Jacob K. Javits 
Convention Center in New York, NY.  We will be debuting our new booth and sharing some 
exciting information about Zope and Digital Creations!  If you are interested in 
attending the exhibits as our guest, please go to 
http://www.digicool.com/gary/lwexhibitspass.pdf  to download your FREE exhibits pass.

We look forward to meeting and talking with you in New York!

If you have any questions about our participation, please email Melissa at 
[EMAIL PROTECTED]

--Gary

Gary Graham [EMAIL PROTECTED]  
Director, Sales  Marketing
Digital CreationsFredericksburg, Virginia
"Dynamic Content in Internet Time"
mobile: 540.840.3813office direct: 540.372.9971
fax   : 540.368-8016 

Creators of Zope: The Future of Content
www.digicool.com  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] Login dialog - another newbie question

2001-01-04 Thread Mohan Baro

Hi there,

I have been trying to do the same. i.e. create a logon form,
what I have been told so far is that:
1) I have to use the method user.authenticate(,)
2) however I have found no documentation for user.authenticate() anywhere
3) others have suggested that I read the source:
ZOPE_DIR/lib/python/AccessControl/User.py


I think its has to be something like.
dtml-call "REQUEST.set('name', 'k.laird.1')"
dtml-call "REQUEST.set('password', '5678')"
dtml-call "acl_users.authenticate('Login', REQUEST, RESPONSE)"



Let me know if you manage to create a login form.




Mohan.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Michal Krejza
Sent: Thursday, January 04, 2001 3:38 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Login dialog - another newbie question


Hi Zopitas,
I have problem with authentication in Zope. I made small site in our
company, and some informations are visible for anonymous user and some for
managers. So I need to authorize users before they connect to restricted
area. It's late for me, becose access to restricted methods is able through
links, which are visible only for managers. Is there any way to make some
form for login to Zope. But without another application like LoginManager or
MySQL User Folder and etc. My Zope server is running on WinNT and I have
problem with these application.

Michal Krejza

When users connect to a restricted area a dialog box pops up that
 looks more or less like 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 )



___
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] Deleting Connection that hangs Zope

2001-01-04 Thread Steve Spicklemire


Hi Jerry,

   You could remove the adaptor Product from Zope the Zope Products
folder and restart, the object will be broken, but deletable, then
restore the Product and restart Zope. 

-steve
 "Spicklemire," == Spicklemire, Jerry [EMAIL PROTECTED] writes:

Spicklemire, Hi Zope Fans,

Spicklemire, Has anyone found a good way to delete a Database
Spicklemire, Connection that hangs Zope at startup? The
Spicklemire, connection seems to be waiting "forever", and so
Spicklemire, there is no access to the Zope interface, so of
Spicklemire, course I can't delete, or disable the offending
Spicklemire, object.

Spicklemire, If there were just a way to set it to not connect
Spicklemire, immediately, prior to startup, that should be
Spicklemire, sufficient. The general question is, "How do you
Spicklemire, access a Zope Object, without running Zope?"

Spicklemire, BTW, I take back everything I said about RDBMS
Spicklemire, Storages being superfluous .  . .

Spicklemire, Thanks, Jerry S.

Spicklemire, ___ Zope
Spicklemire, maillist - [EMAIL PROTECTED]
Spicklemire, http://lists.zope.org/mailman/listinfo/zope ** No
Spicklemire, cross posts or HTML encoding!  ** (Related lists -
Spicklemire, http://lists.zope.org/mailman/listinfo/zope-announce
Spicklemire, 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] Login dialog - another newbie question

2001-01-04 Thread Chris McDonough

Mohan,

The standard Zope user folder handles only basic authentication which
generally needs to be done via a popup dialog on your browser.  At some
point, a user needs to type his authentication credentials into the dialog.
The Zope security machinery handles this in the background.

To force a popup box to be displayed:

dtml-raise Unauthorized
  You are not logged in.
/dtml-raise

There is a user folder product named "UserDb" which supports cookie
authentication that lets you create a custom login form.  There is also the
"LoginManager" product, which I think allows you to do the same (though I've
not used it).



- Original Message -
From: "Mohan Baro" [EMAIL PROTECTED]
To: "Michal Krejza" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 04, 2001 12:45 PM
Subject: RE: [Zope] Login dialog - another newbie question


 Hi there,

 I have been trying to do the same. i.e. create a logon form,
 what I have been told so far is that:
 1) I have to use the method user.authenticate(,)
 2) however I have found no documentation for user.authenticate() anywhere
 3) others have suggested that I read the source:
 ZOPE_DIR/lib/python/AccessControl/User.py


 I think its has to be something like.
 dtml-call "REQUEST.set('name', 'k.laird.1')"
 dtml-call "REQUEST.set('password', '5678')"
 dtml-call "acl_users.authenticate('Login', REQUEST, RESPONSE)"



 Let me know if you manage to create a login form.




 Mohan.



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 Michal Krejza
 Sent: Thursday, January 04, 2001 3:38 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Login dialog - another newbie question


 Hi Zopitas,
 I have problem with authentication in Zope. I made small site in our
 company, and some informations are visible for anonymous user and some for
 managers. So I need to authorize users before they connect to restricted
 area. It's late for me, becose access to restricted methods is able
through
 links, which are visible only for managers. Is there any way to make some
 form for login to Zope. But without another application like LoginManager
or
 MySQL User Folder and etc. My Zope server is running on WinNT and I have
 problem with these application.

 Michal Krejza

 When users connect to a restricted area a dialog box pops up that
  looks more or less like 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 )



 ___
 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] Deleting Connection that hangs Zope

2001-01-04 Thread Spicklemire, Jerry

Steve suggested:

 You could remove the adaptor Product from Zope the Zope Products
 folder and restart, the object will be broken, but deletable, then
 restore the Product and restart Zope.

Good Idea! That's about as simple as this sort of 
thing can get, I suspect.

 Has anyone found a good way to delete a Database
 Connection that hangs Zope at startup? The
 connection seems to be waiting "forever", and so
 there is no access to the Zope interface, so of
 course I can't delete, or disable the offending
 object.

 If there were just a way to set it to not connect
 immediately, prior to startup, that should be
 sufficient. The general question is, "How do you
 access a Zope Object, without running Zope?"

I was finally motivated enough to fire up Ty Sarna's 
Tranalyzer ( http://www.zope.org/Members/tsarna/Tranalyzer )
which makes it quite painless to find a point at which 
to truncate (the last few records of) the /var/data.fs 
file.

Thanks!
Jerry S.




___
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] BUG: subtransaction not handled correctly in manage_addFile(was: [Zope] Re: manage_addFile problem) (was: [Zope] Re: manage_addFile problem)

2001-01-04 Thread Dieter Maurer

Ian Sealy writes:
  I sent the following message to the list just before Christmas, but
  didn't get any replies.
You probably did not get an answer because it is extremely difficult
to see the problem cause.

Apparently, the upload was successful and resulted in some
subtransaction (because your file was large).

Later an exception occured during the commit.
Zope tries to abort the associated transaction.
During this abort, Zope hits the subtransactions
and wants to abort them calling "abort_sub" on
them.
However, at least one of the subtransaction objects
does not have this method.
This results in your backtrace.

Apparently, there is a Zope bug in the subtransaction
handling or their abort. Please file a bug report
into the Collector.

On the other hand, the bug is triggered by
something. I would expect, it is an
exception in "ZODB.Transaction:261",
AttributeError "commit_sub".
You can verify this, if you put an
"import traceback; traceback.print_exc()"
below line 270.
Problably some non-subtransaction object
managed to enter in "subjars".
I can't tell you why.


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] Zope eating CPU/RAM - how do I find the culprit?

2001-01-04 Thread Dieter Maurer

Oliver Bleutgen writes:
  Shouldn't tags for creating sql-statements in ZSQL
  (like dtml-sqltest) quote the variables by default in order
  to prevent unexpected conversions by the database?
Did you check, that standard SQL supports quoted
names?

Even if it does, the proposed change will probably break
lots of existing code.
I fear, in our projects, the fact that case does not matter
has been widely used.
We would have to change hundreds of SQL methods
after the proposed change.

For new projects, I would like to have it your way.
However, this will be difficult to achieve.


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] EVAL DTML?

2001-01-04 Thread Dieter Maurer

Brian Withun writes:
  Is it possible to, say, retrieve DTML code from an external database (such
  as Sybase) and then have that DTML code render itself?  As I recall there is
  a security issue with Zope allowing Python to EVAL dtml..
You can't do it in DTML, but you can in an
External Python Method:

  Look at "DocumentTemplate.DT_HTML.HTML"
  (and "DocumentTemplate.DT_String.String).

  You create a new "DocumentTemplate.DT_HTML.HTML"
  from your DTML code and then call it.



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] SQL query from Multiple Selection Field(was: [Zope] [Newbie] ZSQL problem) (was: [Zope] [Newbie] ZSQL problem)

2001-01-04 Thread Dieter Maurer

Hi Michal,

Michal Seta writes:
  ... query
 "select ... where col = dtml-sqlvar multiple_section type=string"
  works for single value but not for multiple selection ...

This is difficult indeed, as you have to fight
various strange behaviours.

First, it is easy to explain, why your query does not work:

  When you select more then one value from the selection
  list, then "multiple_section" will be a list.
  Your "sqlvar ... type=string" converts this into a string
  that looks like "[ 'a', 'b', 'c']".
  This string is then compared to your database column.
  You easily see, the result will be false.

Your SQL query is not correct to search for a value
in a list of possible values. You must use something
like

 select ... where col in ( 'a', 'b', 'c' )

How to construct such a query?
If you know, that your values do not contain quotes (i.e. '),
then you can use "_.string.join" like this:

 select ... where
 col in ( dtml-var "_.string.join(multiple_selection,',')" )

Now, your code will work, when you select more than one value
from the list. It will fail, if you select a single item
(or none at all).

It fails for a single selected value, because in this case
"multiple_selection" is not a list but a single value.
Fortunately, if you put the ":list" suffix at the form
variable name (like "select name="multiple_selection:list" multiple ..."),
then you tell ZPublisher, that you want this to be a list.
In this case, you will get a list with one value.
This works well...

... up to the case, where no value is selected.


In this case, the variable is completely missing from the
request. You probably will get a "Bad request; missing
arguments ['multiple_selection']" from your ZSQL method.

In your case, it is probably best, to catch this case
in the DTML code that handles your form and report a nice
error.


After you became more familiar with Zope and the rough edges
of HTML form processing, you will hit cases where the above
approach is not adequate.
You can then ask again in the list (or search the searchable
list archive).


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] Deleting Connection that hangs Zope

2001-01-04 Thread Dieter Maurer

Spicklemire, Jerry writes:
  Has anyone found a good way to delete a Database Connection that hangs Zope
  at startup? The connection seems to be waiting "forever", and so there is no
  access to the Zope interface, so of course I can't delete, or disable the
  offending object.
You may try to make the "connect" of your database adapter
temporarily a no-op (by changing the source and putting in
a return).

This may let you enter your Zope again and fix the strange
object.


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] Question: How to generate a core file in Solaris 2.6

2001-01-04 Thread Dieter Maurer

Michael Best writes:
  ... core generation under Solaris ...
I have seen Zope cores under Solaris 2.6.

This means,

  * either the problem you see does not result in a situation
that usually causes a core dump
or
  * your configuration prevents cores from being generated.

I expect the latter.


You told us, that you already changed the "ulimit" value.
You know, that there are too values, a soft limit that
can later be changed and a hard limit that can only be
tightened? Maybe, there is some hard limit preventing you
from changing the core size limit or Zope wants to
generate a core that is larger than the size you specified.

You can test core generation independent of Zope
(to clean any configuation problems):

sleep 500 
kill -QUIT %%

This let's "sleep" generate a core.

One you get "sleep" cores, you can hit Zope with the
"-QUIT" signal. Zope's core will be bigger, therefore,
the "ulimit" core limit must be larger.

Once, you can reliably force Zope into a core, you can
look at your instability again.


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] Core Session Tracking kudos namespaces

2001-01-04 Thread Dieter Maurer

Chris McDonough writes:
  So the question becomes: do we want DTML namespace lookup magic or no DTML
  namespace lookup magic for names that we attempt to look up in a session
  data object? 
Maybe, we do not want the magic automatically but have
a simple way to call for it, when we like.

I think exposing the SessionData keys as attributes (in addition
to exposing them as mapping keys) is a good thing.

It allows to use:

   dtml- expr="... sessionData.a ..."

as well as

   dtml-with sessionData
 dtml-var a
   /dtml-with

i.e. place them in the DTML namespace, if we think they should go
there.

As said in an earlier message, it would be possible to
bring them in the DTML namespace, if they would implement
Python's mapping interface. In this case, we could use

  dtml-with sessionData mapping
 dtml-var a
  /dtml-with


We now use "FSSession" which implements the full Python mapping
interface. We can use dtml-with FSSession mapping, if
we think this is good.

Usually, however, we put all relevant session data into
REQUEST.form and REQUEST.other in setup code
and allow the main code not to worry about session handling
at all.


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] Adding many users

2001-01-04 Thread Dieter Maurer

Ragnar Beer writes:
  I need to add about 150 users to an acl_users folder and I wouldn't 
  like to do it manually since the data already exists in a python 
  list. What would be an elegant way to add them all with a python 
  script?
An external Python method or
an external automation based on ZClient (Howto on zope.org).

For both approaches, you must know the parameters
of "manage_addUser". If nowhere else, you will find
them in the source: "AccessControl.User.UserFolder.manage_addUser".



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] Zope eating CPU/RAM - how do I find the culprit?

2001-01-04 Thread Oliver Bleutgen

 Oliver Bleutgen writes:
   Shouldn't tags for creating sql-statements in ZSQL
   (like dtml-sqltest) quote the variables by default in order
   to prevent unexpected conversions by the database?
 Did you check, that standard SQL supports quoted
 names?

First, I meant double quotes (") not single one's ('),
in case that wasn't clear.

I know that for mysql, postgres, oracle there are column names
which will surely break dtml-sqltest as it is implemented now.
Either lowercase letters (oracle, as you also noted) or uppercase
(the other two). I guess sql-keywords and special characters as
column names - ok, not a very clever idea - will break sqltest
on all of them. At least I didn't find a way to get it to 
work without patching zope.

Searching the web I find various hints that many odbc,jdbc adapters
and sql-db frontends use quoted names per default (psql).
Unfortunately I don't want to pay to the ANSI-commitee for reading
into the sql-standard, but I'm pretty sure every newer database
supports that.


 Even if it does, the proposed change will probably break
 lots of existing code.

Right, how about adding a argument like, let's say "sql_quote"? ;)
Unfortunatly, I fear I'm have not enough knowledge in zope's 
internals to offer a clean patch.

 I fear, in our projects, the fact that case does not matter
 has been widely used.
 We would have to change hundreds of SQL methods
 after the proposed change.
 For new projects, I would like to have it your way.
 However, this will be difficult to achieve.

I would like to see quoting as a standard, but you have a point.
Maybe sql_quote is the way to go.


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 )




RE: [Zope] Industry customer lists

2001-01-04 Thread George Milliken




farm9 
is a California corporation whose mission is to provide managed security 
services, software and training to protect critical end-user computing 
infrastructure.

farm9 
is a pioneer in the field of remote Internet security vulnerability detection, 
analysis and response. farm9 
utilizes a subscription based (managed service provider) business model to 
provide state-of-the-art preventative security solutions to businesses and 
governments located throughout the world.

Our 
security development team constantly updates our products detection 
capabilities. Since our solutions 
are delivered remotely, via the Internet, customers receive these benefits 
instantly, without need to install software or upgrade 
systems.

farm9 
offers the following IT security products  services:



Available Now


  Thresher 
   
  Managed Vulnerability Scanning service
  Baler 
  eFTP  
  Replace FTP with encrypted browser based eFTP
  Harvester 
  Managed IDS/Log Consolidation  Alerting
  Hacking 
  101 Training 
  Security Training for System Administrators
  IVA 
  Penetration Testing  Assessment
farm9 
uses, supports, and produces Open Source software products in its service 
offerings. This allows partners, 
affiliates, and customers to leverage the Open Source community in their 
commercial environments. At farm9 
we believe the best security software is open security 
software.
Our 
San Francisco data center contains highly advanced systems, which remotely scan 
customers sites. Maintaining 
continuous 24x7 vigilance in the fight against Internet-based intruders. Our solutions protect information 
systems that are exposed to the Internet. 
We protect all systems with continuous Internet connection such as 
co-located servers, DSL, and cable modem connections.

Regards,George Milliken, CEOfarm9.com, 
Inc.--[EMAIL PROTECTED] 24x7 Intrusion Prevention  
Incident Responsehttp://www.farm9.com 24x7 Log 
Consolidation  Managed IDSSOC : 415-863-8035 cell: 
510-913-8669 efax: 520-222-8546 
== See us 
at SANS New Orleans Jan. 28 - Feb. 2, 2001 
== 



  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Luis BotelhoSent: 
  Wednesday, January 03, 2001 4:00 AMTo: 
  [EMAIL PROTECTED]Subject: [Zope] Industry customer 
  lists
  
  This email is to request information on your company for our on 
  line directory and introduce you to our company Repharm. 
  Best Regards, Dianne Edwards Tel: 
  905-721-8456 Fax: 
  905-721-1471 email: 
  [EMAIL PROTECTED] 
  Repharm has the following installed customer databases and services 
  available to increase your sales. 
  ERP: 
  BAAN JD 
  Edwards Lawson Marcam Oracle Applications 
  Peoplesoft QAD 
  (Worldwide) SAP SSA Symix 
  CRM: 
  Clarify Pivotal Siebel 
  SUPPLY CHAIN: 
  I2 Manugistics 
  Synquest 
  HARDWARE: 
  AS400 OS390 
  HP SUN 
  DESKTOP 
  APPLICATIONS: Corel 
  Lotus Notes Microsoft 
  COMMUNICATIONS: ASPs CLECS ISPs 
  E-COMMERCE: 
  .com Directory Software 
  Directory Consultant Directory 
  CFO List CIO 
  List 
  INDUSTRY SPECIFIC 
  LISTS: Agriculture, Forestry and 
  Fishing Communications Construction Finance, Insurance and 
  Real Estate Manufacturing 
  Mining Public 
  Administration Retail Trade 
  Services Transportation Utilities 
  Wholesale Trade 
  FRONT OFFICE 
  SERVICES: We offer the following 
  Front Office Services: 
  
Fax Campaigns 
Telemarketing 
Direct Mail Customer 
Satisfaction 
Surveys


Re: [Zope] Industry customer lists

2001-01-04 Thread Lalo Martins

In the future, if you choose to respond to spam, don't CC the
list, please.

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Core Session Tracking kudos namespaces

2001-01-04 Thread Bob Sidebotham

--- Somebody wrote:
  Of course, the best solution would be for the 'magic' lookup to be
  optional...

Alright, I've not a zope master, but isn't this already provided
generically with:

dtml-with SESSION only

All these arguments leave me a little confused: As a newbie, I read the
zope book, and it tells me all these wonderful things about feeding
alligators with ostriches, and the like, and I assume this is meant to
be universal, and just assume that all names are supposed to behave in
this manner. But Chris seems to be saying that *because you've had
flack about this model* maybe a new feature shouldn't use it. Forgive
me if I'm paraphrasing you incorrectly. So the question I have is
this--if there's a basic problem with zope's acquisition semantics (as
some posts on this list would indicate at least some people believe),
then is the right fix for new features to avoid acquisition, or would
it be better to figure out what is good and what is bad and bite the
bullet and get rid of the bad?

Chris keeps saying that it would be hard to explain the semantics. But
if zope is worth learning, shouldn't these semantics be explainable
totally generically? Why should they have to be separately documented
just for session variables? What is really special about session
variables (other than that they can be written to)?

As an aside, how did zope even get this far without session variables?
I'm very confused...

And finally, *even* if the session variables are kept in a private
space, I'd at least like some way to make them public using some
generic pre-processing. But I don't see how to do that, because if I
stick a dtml-with, for instance, into generic header code (included,
for example, by standard-html-header, then this with statement is
required to be *closed* when I edit it). That is, I think the
dtml-with has to be paired, in the header, with a /dtml-with. What
Zen am I missing here? How do you guys do this sort of thing?

No doubt most of the above is due to newbie confusion, not due to
design issues in zope...

Bob


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] Core Session Tracking kudos namespaces

2001-01-04 Thread Bob Sidebotham

--- Chris McDonough [EMAIL PROTECTED] wrote:
 I sympathize with the need to convert all your scripts over to use
 sessioning from hidden form-field encoding and the like... I'd really
 appreciate some input as to what kinds of problems you're trying to
 solve with sessioning.

I don't have any great number of scripts to convert. I've only been
looking at zope for a few weeks. I DO have a significant application
that handles a customer database, supplier ordering, inventory
management and the like. This is currently written in Perl/cgi, and is
way too slow and cumbersome. I'd like to move it into zope and at the
same time make the database directly available to customers. In the
current implementation of the application I maintain a lot of state at
the server side--the server knows the page history, locally configured
options, and the like. In that application I actually force you to use
server-side navigation, since I load over the existing page every time
you make a request (so there is only one page ever resident in the
browser). I did this to make it impossible for the operator to use an
old browser page (with stale form info). This is ugly and requires two
round-trips for each request.

I'm trying to figure out how to move this into zope, and to do this in
the most natural way possible. So I'd like to give up mostly on the
server-side navigation stuff. But I do want to do things like: if you
go from a main page to a form, then if the form succeeds I'd like to
return you directly to the main page (with no extra page fetch). If the
form fails, it might go back to the main page, or include the error
somewhere in the main page. Since the form is likely to be unrelated to
the main page (just linked to from it), I need at least some server
state to tell me where to return. I can also imagine doing side trips
from forms--but that's harder, because then the side trip can't involve
a link, otherwise you lose the information typed in (I "solved" this in
my current implementation by wrapping *every* page in one big form and
making all the links actually do submits, using a little javascript,
but again that's something I'd rather avoid--I'd rather it was simple
and relatively unsurprising).

I'm unclear as to how I should really implement any of this. It almost
seems like there is some sort of abstraction here that can be turned
into a generic facility, but I haven't groked zope enough to figure out
how that would be plugged in and what it would look like.

So anyway, this was supposed to be an answer to your question, but it's
really a thinly disguised attempt to get some design help on this. Is
there another forum purely for design help with this sort of thing? How
to fit a particular navigational abstraction into the zope framework?

Thanks,
Bob


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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 )




[Zope] Python Scripts update

2001-01-04 Thread Evan Simpson

Python Scripts have gone through a fair number of changes and bugfixes
recently.  They should now work properly as methods of ZClasses.  When you
download the source of a Python Script, the title, parameter list, and
bindings are added to the source in the form of specially formatted
comments.  If source with these comments is uploaded or pasted into a Python
Script, it will properly set the properties mentioned in the comment block.
The default bindings have been changed to be more sensible.

If you want to give Python Scripts a try, you can go to
http://ps.4-am.com:9000/ , pick a password, and you'll get your own private
area in a trunk CVS checkout of Zope in which to play.

I promised examples when I first announced this site, and haven't gotten
around to writing any.  If you have created a script or set of objects on
the demo site that you would like to share as an example, please mail me the
URL.

Cheers,

Evan @ digicool  4-am



___
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] case insensitive search?

2001-01-04 Thread Robin Becker

In article 00c601c0766e$c8280540$ae03a8c0@fork, Andy McKay
[EMAIL PROTECTED] writes
No im being stupid and did a replace of sort for search in my caffeine
deprived brain.
--
  Andy McKay, Developer.
  ActiveState.


...
nevEr miNd we're all a BIt dUMb nOW and THEn :)
-- 
Robin Becker

___
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] WIN2k batch problem

2001-01-04 Thread Robin Becker

I'm trying to run Zope 2.2.2 under win2000 in a batch file. I'm just
watching error messages and prints. I find that when zope has written a
page to the cmd.exe window it locks further prints from python until I
hit a key in the window and then it releases another page full. Is there
a Win NT/2K guru who knows about such things and how to prevent this? 
-- 
Robin Becker

___
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] Advice on searching/indexing Word documents?

2001-01-04 Thread Tres Seaver

[EMAIL PROTECTED] wrote:
 
 I really like the idea of extending OFS:File to support different file
 types, but what I would like to see is something that is
 format/filter/library agnostic.

Please have a look at the Hookable PUT proposal (which has already
been implemented for 2.3):

  http://dev.zope.org/Wikis/Proposals/HookablePUTCreation

This project adds an API to the handler for HTTP/FTP PUT requests to
non-existent objects (so that you can specify/tweak the object which
is created).

Handling PUT in the object directly (for WebDAV/FTP/HTTP uploads)
would be the job of your File-like object.  The PTK's content objects
do this now, for limited types of content (structured text with
RFC822-style headers for the metadata);  we plan to add other filters
there, as well.

We'd be glad of your help definining the API.  Could you take the
text of your message and create a fishbowl proposal with it on
the dev.zope.org site?

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations Zope Dealers   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 )