Re: [Zope-dev] Observer / Notification Interface Proposal

2000-05-24 Thread Tres Seaver

"Phillip J. Eby" wrote:
> 
> At 09:15 PM 5/24/00 -0400, Tres Seaver wrote:
> >
> >Note that the scaling requirement (no blocking/long-running actions
> >inside the notification call) is intended to support intra-request
> >notification.  A ConcreteObserver implementation which needs to
> >perform such work (e.g., send an e-mail message, etc.) will have to
> >extract whatever data it needs from the subject and enqueue it for
> >processing in some other thread, by the asyncore machinery, etc.
> >
> >Note as well that it would be possible to install an Observer which
> >could "veto" the change by raising an exception (a clever
> >ConcreteSubject might ignore such a veto, of course).
> 
> As you've probably noticed, I've been working on something similar for
> ZPatterns, but it's specifically oriented to the needs of
> Attribute/SheetProviders and Index/RuleAgents.  The list of observers
> is effectively predefined, and the DataManager acts as a "tee" fanning
> out the events to the interested parties.  However, subscription scope
> is per-transaction; the subscription takes place the first time an
> object hooks up with its DataManager in that transaction.

I added motivating examples to the two interfaces pages:  e-mail
notification and workflow state-machine transitions.  Both of these
involve persistent subscriptions.
 
> >I'm don't have any use case in mind for a cross-transaction "event".
> 
> Perhaps I was unclear.  I was referring to maintaining the link between
> subject and observer for longer than a single transaction.  That is, a
> persistent subscription.

Ah, ok -- I was planning simply to leverage the ZODB's facilities for
maintaining persistent references in the DefaultObservable mix-in; more
elaborate schemes would be possible (for instance to support
rack-mounted observers?)

> >I also have hopes for a set of federated, filterable
> >NotificationChannels (like CORBA's NotificationService) which would
> >allow Observer-in-Zope to scale up enormously.
> 
> Hm.  It seems to me that something like that would require persistent
> subscriptions to be of any real use, since re-subscribing on every
> transaction would likely be inefficient.

I apologize for the confusion -- I certainly didn't intend to convey
that subscriptions were transient.  As you note, that would be a less
than useful "feature."

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




Re: [Zope-dev] eat our own unsupported dog food

2000-05-24 Thread Michael Bernstein

Michel Pelletier wrote:
> 
> There is a recent need for us to install ZDiscussions on Zope.org.  I
> have verified that 0.1.0 works with 2.1.6, but I can't seem to d/l
> 0.2.0.  The author of said software is not available, any one know the
> status on ZDiscussions?  Has any one tweaked it?

I found this:
http://www.zope.org/Members/BwanaZulia/ZUBB/

HTH,

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] FWIW, ZCVSMixin now at 0.0.2... and rising. ;-)

2000-05-24 Thread Michael Bernstein

Steve Spicklemire wrote:

> I've not heard any comments about the usefulness of this concept...
> am I barking up the wrong tree to get version control of zope objects?
> Does someone know of a better way?

Steve, this has been my fondest hope for about three months
now. Now, if I could also get it to do through-the-web XML
(DocBook) editing and rendering, I'd have a complete
end-to-end document management system. Particularly if it
preserved accountability, like Jonothan was mentioning.

I'll be testing this tommorow, and doing my best to get this
to do unnatural things with XMLWidgets and DocBookDocument.

Many thanks,

Michael Bernstein.

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




Re: [Zope-dev] Observer / Notification Interface Proposal

2000-05-24 Thread Phillip J. Eby

At 09:15 PM 5/24/00 -0400, Tres Seaver wrote:
>
>Note that the scaling requirement (no blocking/long-running actions
>inside the notification call) is intended to support intra-request
>notification.  A ConcreteObserver implementation which needs to
>perform such work (e.g., send an e-mail message, etc.) will have to
>extract whatever data it needs from the subject and enqueue it for
>processing in some other thread, by the asyncore machinery, etc.
>
>Note as well that it would be possible to install an Observer which
>could "veto" the change by raising an exception (a clever
>ConcreteSubject might ignore such a veto, of course).

As you've probably noticed, I've been working on something similar for
ZPatterns, but it's specifically oriented to the needs of
Attribute/SheetProviders and Index/RuleAgents.  The list of observers is
effectively predefined, and the DataManager acts as a "tee" fanning out the
events to the interested parties.  However, subscription scope is
per-transaction; the subscription takes place the first time an object
hooks up with its DataManager in that transaction.


>I'm don't have any use case in mind for a cross-transaction "event".

Perhaps I was unclear.  I was referring to maintaining the link between
subject and observer for longer than a single transaction.  That is, a
persistent subscription.


>I also have hopes for a set of federated, filterable
>NotificationChannels (like CORBA's NotificationService) which would
>allow Observer-in-Zope to scale up enormously.

Hm.  It seems to me that something like that would require persistent
subscriptions to be of any real use, since re-subscribing on every
transaction would likely be inefficient.


___
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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Jonothan Farr

> Good questions!
>
> You can just go to the 'admin' tab and type 'diff'.
> The admin tab lets you execute just about any cvs command
> with arguments stat, rtag etc etc.

Doing a diff on a zexp file isn't going to be very helpful, though. Any thoughts
on integrating some sort of xml diff tool?

>
> Conflicts.. uh... bad news. ;-)  I think it's essentially
> impossible to 'merge' two different versions of a zope
> object... so my plan would be to pick one version, or the
> other.
>
> Login and logout are handled when you set up the directory
> on the filesystem. Basically you need to 'checkout'
> a module (maybe an empty module) into a directory
> on the filesystem before you can use it to keep the
> xml representations of your Zope objects. That checkout,
> might, or might not, require a login, depending on your
> CVSROOT. You must 'be' the zope user (the same user that
> the zope process runs as) when you checkout the module,
> so that zope can manage the contents.

So essentially all checkins are by the same cvs user, so you lose the ability to
track accountability? I'd like to see something that was on a per-user basis,
maybe tied to the zope user, maybe not.

There's been a ton of talk about a zope cvs product. I've been thinking about
giving it a shot for a while now. I'm excited to see someone actually doing
something about it. I'd be glad to help out however I can. Especially since now
you've taken the killer name. ;)

--jfarr



___
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] Observer / Notification Interface Proposal

2000-05-24 Thread Michel Pelletier



Tres Seaver wrote:
> 
> I have started a page for an implementation of the GangOfFour Observer
> pattern within Zope:
> 
>http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification>
> 
> Please comment, either here or in the wiki.

I'll do both, this is absolutely a desperately needed feature in the
ZCatalog.  Currently, Cataloged items must take responsibility for
notifying a catalog of their changes instead of the ZCatalog observing
them.

Amos and I talked about this over Pizza a couple weeks ago but we were
thinking from a pretty Catalogcentric view; or at least I was.  I was
considering an interface like the new Security API that could be
imported in python and used to discover and notify catalogs of object
changes.  But this now seems to me to be some kind of pattern where
objects need to discover an appropriate or canonical resource, like a
catalog.  This interface should be defined also, so that newly-born
objects can notify a resources of their existence.  I've added this to
the InterfacesWiki

http://www.zope.org/Members/michel/Projects/Interfaces/Discovery

Thoughts on how they relate?  Are they the same thing?

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

___
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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Steve Spicklemire


Hi Jonothan,

Good questions!

You can just go to the 'admin' tab and type 'diff'.
The admin tab lets you execute just about any cvs command
with arguments stat, rtag etc etc.

Conflicts.. uh... bad news. ;-)  I think it's essentially
impossible to 'merge' two different versions of a zope
object... so my plan would be to pick one version, or the
other. 

Login and logout are handled when you set up the directory
on the filesystem. Basically you need to 'checkout'
a module (maybe an empty module) into a directory
on the filesystem before you can use it to keep the 
xml representations of your Zope objects. That checkout,
might, or might not, require a login, depending on your
CVSROOT. You must 'be' the zope user (the same user that
the zope process runs as) when you checkout the module,
so that zope can manage the contents.

thanks,
-steve

> "Jonothan" == Jonothan Farr <[EMAIL PROTECTED]> writes:

Jonothan> Just curious. How do you do diffs? How do you resolve
Jonothan> conflicts? How do you handle login/logout?  --jfarr



___
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] eat our own unsupported dog food

2000-05-24 Thread Michel Pelletier


There is a recent need for us to install ZDiscussions on Zope.org.  I
have verified that 0.1.0 works with 2.1.6, but I can't seem to d/l
0.2.0.  The author of said software is not available, any one know the
status on ZDiscussions?  Has any one tweaked it?

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

___
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] Observer / Notification Interface Proposal

2000-05-24 Thread Tres Seaver

"Phillip J. Eby" wrote:
> 
> Is this only for events occurring within a transaction, or across
> transactions?  If across transactions, how do you intend to handle
> persistent references, acquisition, and cross-database references?
> (My suggestion would be to use a path to the callable.)

Note that the scaling requirement (no blocking/long-running actions
inside the notification call) is intended to support intra-request
notification.  A ConcreteObserver implementation which needs to
perform such work (e.g., send an e-mail message, etc.) will have to
extract whatever data it needs from the subject and enqueue it for
processing in some other thread, by the asyncore machinery, etc.

Note as well that it would be possible to install an Observer which
could "veto" the change by raising an exception (a clever
ConcreteSubject might ignore such a veto, of course).

I'm don't have any use case in mind for a cross-transaction "event".

> Second, I think there should be an opportunity for the observer to
> specify more detail about what it wants to be called *for*.  I.e.,
> either a specific event or an event mask, to avoid unnecessary
> calls for irrelevant events.

I considered this, and decided that it would be simpler to put the
EventFilter in a "shim" object (e.g. a high-pass filter) which would
sit between the actual subject and observer.  Consider stringing
together a shell pipeline, e.g.::

  ps -aux | grep tseaver | . | sort"

Each piece has a very limited set of responsibilities, but
stringing them together arbitrarily conveys enormous power.

I also have hopes for a set of federated, filterable
NotificationChannels (like CORBA's NotificationService) which would
allow Observer-in-Zope to scale up enormously.

> I realize this is all very implementation oriented, but that's
> me.  :)
> 
> (Oh, btw on "ObserverInterface", I'm guessing you mean the
> contract requires that *observable* not worry about delays, not the
> other way around.)

Changed it to 'subject' -- thanks for pointing it out!

Thanks for the feedback!

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 )




Re: [Zope-dev] Observer / Notification Interface Proposal

2000-05-24 Thread Phillip J. Eby

At 07:19 PM 5/24/00 -0400, Tres Seaver wrote:
>I have started a page for an implementation of the GangOfFour Observer
>pattern within Zope:
>
>  http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotificat
ion>
>
>Please comment, either here or in the wiki.
>

Is this only for events occurring within a transaction, or across
transactions?  If across transactions, how do you intend to handle
persistent references, acquisition, and cross-database references?  (My
suggestion would be to use a path to the callable.)

Second, I think there should be an opportunity for the observer to specify
more detail about what it wants to be called *for*.  I.e., either a
specific event or an event mask, to avoid unnecessary calls for irrelevant
events.

I realize this is all very implementation oriented, but that's me.  :)

(Oh, btw on "ObserverInterface", I'm guessing you mean the contract
requires that *observable* not worry about delays, not the other way around.)


___
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] Observer / Notification Interface Proposal

2000-05-24 Thread Tres Seaver

I have started a page for an implementation of the GangOfFour Observer
pattern within Zope:

  http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification>

Please comment, either here or in the wiki.

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 )




Re: [Zope-dev] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Jonothan Farr

Just curious. How do you do diffs? How do you resolve conflicts? How do you
handle login/logout?
--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998



___
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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Shane Hathaway

Steve Spicklemire wrote:
> Hope that helps It's really shocking just how easy it was
> to do this makes me wonder why it hasn't been done already,
> and *that* makes me wonder if I'm doing something really dumb
> here. ;-) It seems kinda cool to me.

I find that the same phenomenon keeps occurring for the things I've
been doing as well.  Transparent folders, product refresh, and even
mounted databases all turned out to be a lot simpler than anyone
thought they would be.  Makes it fun to be a software engineer, don't
you think?

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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Steve Spicklemire


Hi Jerry, (in case you're wondering.. Jerry really *is* my brother..)

> "JS" == Jerry Spicklemire <[EMAIL PROTECTED]> writes:

JS> Chris Withers wrote:

>> Sounds like a cool idea, but I don't really understand what it
>> does and how you use it.
>> 
>> Could you give use some enlightenment?

JS> ZCVSMixin is a sort of replacement for a standard Zope Folder
JS> Object. If you want to be able to maintain an entire Zope
JS> Folder (and everything in it) in CVS, use a ZCVSMixin Object
JS> instead. Then, from the Manage view, you get a new tab showing
JS> up that provides the interaction with CVS.

That's basically right. Technically there are two parts. ZCVSMixin is
a python "Product" that handles talking to CVS and importing and
exporting objects. There is also a ZClass that inherits from both
Folder, and ZCVSMixin to provide Folder behavior and methods while
adding CVS support, hence the name Mixin. I believe you could really
use the 'Mixin' to add CVS support to any subclass of ObjectManager,
in a similar way.

JS> What it actually does is an Export as XML on the whole
JS> "folder", which then can be stored, view, checked out, checked
JS> back in, and otherwise thoroughly managed and maintained
JS> within CVS. For developers that are deep into Zope, and
JS> familiar with CVS, this represents some potent possibilites.

Well.. close! It exports and imports all the objects in the folder
individually. This way I can edit one method, then 'checkin' that 
change with CVS. Anyone else with access to my repository can do
a 'checkout' from their Zope and get all the latest versions of
my objects in their zope. Think of it as the public CVS that 
CD uses now to publish Zope itself, but taken to the level of
tracking individual zope objects contained in Zope folders.

I've just been playing with it.. and you can sorta get the idea
looking at:

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/

With CVS you can tag revisions etc and take a snapshot in time
of your zope objects, just like we do now with source code.

JS> Think about checking out a Zope Widget from a CVS on the other
JS> side of the planet, importing as XML into your local Zope,
JS> where it is marshalled back from its CVSish XML form into the
JS> original native Zope self. Now you can tweek it to your hearts
JS> content, export as XML, then check the updated version back
JS> in, where it becomes part of the trackable, archived,
JS> searchable CVS system.

Right... that's the idea.

JS> Steve, please clarify any of the concepts I've managed to
JS> mangle!

Hope that helps It's really shocking just how easy it was
to do this makes me wonder why it hasn't been done already,
and *that* makes me wonder if I'm doing something really dumb 
here. ;-) It seems kinda cool to me. 

-steve

___
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: ZCVS Mixin class... feedback sought.

2000-05-24 Thread Chris Withers

Jerry Spicklemire wrote:

[snip]

> Steve, please clarify any of the concepts I've managed to mangle!

Now this sounds like something I waffled about a few weeks back...

...cool :-)

I don't think I'm gonna have a chance to play though :S

I'll jump in at 1.0.0 though and I'm there in spirit now ;-)

Good luck,

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 )




[Zope-dev] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Jerry Spicklemire

Chris Withers wrote:

>Sounds like a cool idea, but I don't really understand what it does and
>how you use it.
>
>Could you give use some enlightenment?

Have a little patience with Steve, to him reading Python source code is
like reading 
our own native language to the rest of us. "Docs, we don't need no stinkin'
docs!"

ZCVSMixin is a sort of replacement for a standard Zope Folder Object. If
you want to be able to maintain an entire Zope Folder (and everything in
it) in CVS, use a ZCVSMixin Object instead. Then, from the Manage view, you
get a new tab showing up that provides the interaction with CVS. 

What it actually does is an Export as XML on the whole "folder", which then
can be stored, view, checked out, checked back in, and otherwise thoroughly
managed and maintained within CVS. For developers that are deep into Zope,
and familiar with CVS, this represents some potent possibilites. 

Think about checking out a Zope Widget from a CVS on the other side of the
planet, importing as XML into your local Zope, where it is marshalled back
from its CVSish XML form into the original native Zope self. Now you can
tweek it to your hearts content, export as XML, then check the updated
version back in, where it becomes part of the trackable, archived,
searchable CVS system. 

Steve, please clarify any of the concepts I've managed to mangle!



___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Chris Withers

Michel Pelletier wrote:
> 
> I'm looking into this right now...
> 

Many thanks :-)

As you may have gathered from my posts, I've been having a bit of a
ZCatalog/SiteAccess (not to mention MIME) nightmare today...

...I took a day off work to try and get Squishdot 0.4.0 out and have
spent the day tryign to figure out whether or not it's my that that's
$"£$ed

All I'd like to know is:

Is ZCatalog in 2.1.6 likely to return incorrect search results, or is it
my python code that's broken?

In either case, how do I fix it? ;-)

cheers,

Chris

PS: My code, that may be broken... data is an IOBTree for id-->Posting
objects. Could there be any untoward aquisition going on here? Posting
acquires from Implicit.

def recatalogPostings(self,REQUEST=None):
""" Clear the Catalog and then Index all the postings. """
self._catalog.clear()
for id in self.data.keys():
obj = self.data[id]
self.catalog_object(obj,self.absolute_url(1)+
obj.thread_path()+ '/' + `id`)
return self.manage_postings(self, REQUEST) 

The index which is causing the problem is 'textToSearch' which is
supplied by the following function:

def textToSearch(self):
"""# returns the text to search for a ZCatalog"""
text=''
for line in self.summary:
# strip out HTML and append a newline to each line.
text = text+tagRegex.sub("",line)+'\n'
for line in self.body:
# strip out HTML and append a newline to each line.
text = text+tagRegex.sub("",line)+'\n'
return text

___
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] Cannot rename or move my ZClass object

2000-05-24 Thread Lindell Alderman

I have derived a ZClass from the Folder base class and it works
great, except I cannot rename or move my ZClass.  How can I fix this?

-L

___
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] XML to SQL or XML into tables

2000-05-24 Thread Kent Polk

On 24 May 2000 07:20:00 -0500, Thomas Weholt wrote:
>Hello,
>
>Has anybody tried to somehow get xml-data into SQL-statements or in some
>other way use xml-data as datasource for insertion into tables?
>It shouldn`t be impossible, if we could just agree on some format or DTD to
>use. 

I'm headed that way - I'm planning on using XML-RPC to insert table
records into an SQL database. I have the client stuff written -
creates the XML files with the data the way I need it.  I've written
an xml.sax parser to parse the table records. It works great :^)
What different paths are currently available via Zope to parse my
XML files for insertion into an SQL database?

Currently, my sax parser identifies the database and builds a
dictionary of tables, with a list of dictionaries which represent
the table records to insert. Right now I have all level 1 tags
representing tables with level 2 tags representing the records.
Record attributes and tag levels beyond the record level are used
to create the record dictionary.  I'm basically using the W3C
recommendations for representing a simple relational database.

There might be some value in using the tags to indicate structure
and the attributes to indicate data, but I'm not sure that level
of complexity is needed. Seems to me that a simple well-behaved
XML file could suffice. I think there is value in using specific
tags and attributes to identify databases and tables, but beyond
that why not just use tags to represent the data? table names are
tags, their attributes, tags and and data are the record data.

Since each table record needs to have a column name associated with
it (to build a record dictionary), that would seem to allow only
attributes and subtags (with their data), not data directly.  I'm
wondering why not just use attributes to describe the record data
unless it's a blob or such that is easier to handle with a tag?

[...]
>Any thoughts? I know this could at least sort out alot of troubles I`m
>having right now getting data from external sources into Zope.
>I`m going to try and make a product or a method etc. that uses xmllib doing
>this, but if anybody has done it allready I`d be very happy do "abuse" their
>effort. :->

If the XML data isn't significantly large, I would consider leaving
it as XML in the database and just query it.  This looks like an
excellent job for Racks and Predicates. :^)


___
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] FWIW, ZCVSMixin now at 0.0.2... and rising. ;-)

2000-05-24 Thread Steve Spicklemire


Ack.. had to move one of these URLS:

> "Steve" == Steve Spicklemire <[EMAIL PROTECTED]> writes:

Steve> FYI... if anyone out there is testing... there is already
Steve> an update to ZCVSMixin.

Steve> http://www.zope.org/Members/sspickle/ZCVSMixin

Steve> This is of course in cvs!

Steve> http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zope/lib/python/Products/ZCVSMixin/

not any more! Now it's

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopepub/lib/python/Products/ZCVSMixin/

Steve> and you can see some cvs'ed objects:

Steve> http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/

Steve> -steve

I've not heard any comments about the usefulness of this concept...
am I barking up the wrong tree to get version control of zope objects?
Does someone know of a better way?

thanks!
-steve


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Michel Pelletier

Chris Withers wrote:
> 
> Itamar Shtull-Trauring wrote:
> > Last I heard, this bug fix did NOT fix the key-error problem.  We are still
> > getting lots of them (but it may have been fixed since in CVS.  Michel?)
> 
> This is weird... the bit of code in question was:
> lib/python/SearchIndex/Lexicon.py line 132:
> 
> 
> However, in the CVS I see it is now:
> else:
> if not hasattr(self, 'counter'):
> self.counter = 0
> self._lexicon[intern(word)] = self.counter
> self.counter = self.counter + 1
> return self.counter - 1

???

I'm looking into this right now...

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

___
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: ZCatalog and Unique IDs

2000-05-24 Thread Michel Pelletier



Chris Withers wrote:
> 
> Hi,
> 
> I hope this is a stupid question but why does ZCatalog use the URL of an
> object to uniquely identify it?

Because it's unique.
 
> Why not just use a reference to the object?

How do you define that?  If you mean reference in the strictly python
sense, then I guess you're thinking about some kind of name or
dictionary key in the catalog that is directly assigned the value of the
observed object?  This sorta gets back to the symbolic link vs. hard
link analogies brought up in the past.  Both have their dificulties, you
cannot, for example, have a reference across databases, while you can
map the physical path.  Using a string like this could also allow you to
quickly modify the catalog to index external resources.

> Persistent object
> identifiers must exist for the ZODB so why not use them instead?

They change, I believe, over the revisions of the objects; and also this
is a very low level identifier.  I'm not certain.  I think this
attribute is _p_oid.
 
> cheers,
> 
> Chris
> 
> PS: This would solve all the problems with ZCatalogs and virtually
> hosted sites...

So would a solid traversal interface that understood virtual hosting in
Zope.

> I think the traversal interface is needed for other
> reasons but it should remove ZCatalog from the list of things that need
> it... not that I've just been bitten by this or anything ;-)

I understand, but I think most of the biting was due to bugs than a flaw
in the model.

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral

___
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] how to download a entire ZWiki site?

2000-05-24 Thread Gregor Hoffleit

On Mon, May 22, 2000 at 07:28:09PM +0400, Jephte CLAIN wrote:
> Where I work, I do not have access to the internet, and as such, I have
> to move software and docs back and forth to my office. I understand that
> it is better for collaborative work to use ZWikis, but I wonder, how do
> I download the entire site to view it offline???

Hmm, offline browsing and Wikis don't mix very well. 

For structured wikis, I had some success with wget, grabbing the root
"Entire wiki Contents" page like this:

  wget -r -l1 http://www.zope.org/Products/PTK/ZWiki/FrontPage/map

This should traverse all the wiki pages. This won't get things like the
"backlinks" or "offsprings" pages, though, but it's enough to browse through
a local copy of the pages.

Here we're running in the problem of mapping Zope's traversal paths onto a
filesystem: Using "wget -r -l2" won't work, since e.g.
"http://www.zope.org/Products/PTK/ZWiki/HowDoIEdit" is an HTML document as
well as a directory (like in
"http://www.zope.org/Products/PTK/ZWiki/HowDoIEdit/backlinks"). Now we
needed a Zope-aware wget that would save the HTML document as e.g.
.../HowDoIEdit/index.html


Anyway, if you use this to fill up a web proxy cache (e.g. wwwoffle), that
knows how to handle these cases, it works quite nice, even with -l2.


I noticed another problem with wget and Zope: ZServer doesn't issue a
Last-modified header, therefore incrementely updating the pages using
timestamps (-N) fails:

  freefly;129> wget -N -r -l1 http://www.zope.org/Products/PTK/ZWiki/FrontPage/map
  --17:08:06--
  http://www.zope.org/Products/PTK/ZWiki/FrontPage/map
 => www.zope.org/Products/PTK/ZWiki/FrontPage/map'
  Connecting to www.zope.org... connected!
  HTTP request sent, awaiting response... 200 OK
  Length: 1,745 [text/html]
  
  0K -> .  [100%]
  
  Last-modified header missing -- time-stamps turned off.
  17:08:06 (41.56 KB/s) - www.zope.org/Products/PTK/ZWiki/FrontPage/map' saved
  [1745/1745]



Gregor


___
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] FWIW, ZCVSMixin now at 0.0.2... and rising. ;-)

2000-05-24 Thread Steve Spicklemire


FYI... if anyone out there is testing... there is already an update
to ZCVSMixin.

http://www.zope.org/Members/sspickle/ZCVSMixin

This is of course in cvs! 

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zope/lib/python/Products/ZCVSMixin/

and you can see some cvs'ed objects:

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/

-steve


___
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] Problems with LoginManager form-based login

2000-05-24 Thread Kevin Dangoor

- Original Message -
From: "Phillip J. Eby" <[EMAIL PROTECTED]>
To: "Itamar Shtull-Trauring" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 24, 2000 9:59 AM
Subject: Re: [Zope-dev] Problems with LoginManager form-based login


> Make your root acl_users a LoginManager, with the loginForm there.
> LoginManager will only allow "Anonymous" to log in if it is the root
> acl_users.  This is how standard user folders behave, and *have to*
because
> of the way manage_workspace works, unfortunately.  Until/unless a new
login
> protocol is worked out in Zope, this is the workaround.

Can you make the root acl_users a LoginManager now? (Is that in 2.1.6 or the
CVS version?) I know that the new ownership stuff made this impossible to do
in the CVS version (unless that's already been changed...)

Kevin


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Chris Withers

Itamar Shtull-Trauring wrote:
> You're using 2.1.6?  That's something different.  The KeyErrors bug only
> appeared in CVS ZCatalog - the partial searching version.  So it must be
> something else - and for all I know this bug is fixed in CVS.

Yeah, this is happening on 2.1.6 as part of Squishdot 0.4.0 which I was
hoping to release today, but this is going to put that back a bit :(

What I'm experiencing is documents being returned that don't match the
search criteria, usually only one per search, which is why I thought it
was that same error...

It'd be nice to have some way of checking what text ZCatalog is actually
indexing although I'm 80% sure my code is doing what it should...

I'd love to hear comments from anyone who's experienced the same thing,
or from Michel to say it's something I'm doign wrong as this is driving
me nuts :(

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] Problems with LoginManager form-based login

2000-05-24 Thread Phillip J. Eby

At 05:24 PM 5/24/00 +0300, Itamar Shtull-Trauring wrote:
>"Phillip J. Eby" wrote:
>
>> Make your root acl_users a LoginManager, with the loginForm there.
>> LoginManager will only allow "Anonymous" to log in if it is the root
>> acl_users.  This is how standard user folders behave, and *have to* because
>> of the way manage_workspace works, unfortunately.  Until/unless a new login
>> protocol is worked out in Zope, this is the workaround.
>
>But this user isn't even supposed to access manage_workspace - I just need
>it to access a PTK join_form so it can become a member.  
>
>I tried making loginForm on the top level display a dtml method
>customLoginForm (which contains the actual form), and then override it in
>the PTK folder, but it doesn't - it displays the one on the top level.  And
>I can't use the same loginForm in the whole site, because I may have  few
>portals, and I need the login form to say "if you are not a member you can
>join here".
>
>Any ideas?
>


This is a problem that apparently can only be solved by replicating
ZPublisher's backward walk, which is the wrong thing to do because the
traversal will be O(n^2).  Bleah.  I guess we'll have to do something like
Stuart Bishop's backward walk in the GUF, since any enhancement of the
ZPublisher architecture to handle login forms properly won't happen until
at least 2.2.

Meanwhile, I suppose Ty and I should try to come up with a proposal for
revising ZPublisher to be able to walk back on the user lookups but still
use the login form closest to the URL being accessed.


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Itamar Shtull-Trauring

Chris Withers wrote:

> I'm not even going to try and guess which is right, all I know is that I
> haven't made either change yet and I'm getting an unacceptable number of
> incorrect search results in stock 2.1.6 and would like to sort it out...

You're using 2.1.6?  That's something different.  The KeyErrors bug only
appeared in CVS ZCatalog - the partial searching version.  So it must be
something else - and for all I know this bug is fixed in CVS.

-- 
Itamar S.T.  [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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Chris Withers

Itamar Shtull-Trauring wrote:
> Last I heard, this bug fix did NOT fix the key-error problem.  We are still
> getting lots of them (but it may have been fixed since in CVS.  Michel?)

This is weird... the bit of code in question was:
lib/python/SearchIndex/Lexicon.py line 132:

else:
self._lexicon[intern(word)] = self.counter
self.counter = self.counter + 1
return self.counter

Now Michel's patch was to change this to:
else:
self.counter = self.counter + 1
self._lexicon[intern(word)] = self.counter
return self.counter

However, in the CVS I see it is now:
else:
if not hasattr(self, 'counter'):
self.counter = 0
self._lexicon[intern(word)] = self.counter
self.counter = self.counter + 1
return self.counter - 1 

I'm not even going to try and guess which is right, all I know is that I
haven't made either change yet and I'm getting an unacceptable number of
incorrect search results in stock 2.1.6 and would like to sort it out...

Any ideas?

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 )




[Zope-dev] Re: __call__ issue

2000-05-24 Thread Jim Fulton

Chimezie Thomas-Ogbuji wrote:
> 
> I've posted an concern/issue with aquisition and method invokation on
> the wikki at:
> 
> 
>http://216.164.72.7:7780/Wiki/Members/jim/ZDOM/Issue%20with%20__call__%20and%20Aquisition

I just added a comment to this page, which now happens to be at:

http://www.zope.org/Wikis/zope-xml/Issue%20with%20__call__%20and%20Aquisition

that described some new work we are doing on standardized method binding.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

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] Problems with LoginManager form-based login

2000-05-24 Thread Itamar Shtull-Trauring

"Phillip J. Eby" wrote:

> Make your root acl_users a LoginManager, with the loginForm there.
> LoginManager will only allow "Anonymous" to log in if it is the root
> acl_users.  This is how standard user folders behave, and *have to* because
> of the way manage_workspace works, unfortunately.  Until/unless a new login
> protocol is worked out in Zope, this is the workaround.

But this user isn't even supposed to access manage_workspace - I just need
it to access a PTK join_form so it can become a member.  

I tried making loginForm on the top level display a dtml method
customLoginForm (which contains the actual form), and then override it in
the PTK folder, but it doesn't - it displays the one on the top level.  And
I can't use the same loginForm in the whole site, because I may have  few
portals, and I need the login form to say "if you are not a member you can
join here".

Any ideas?

-- 
Itamar S.T.  [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] Problems with LoginManager form-based login

2000-05-24 Thread Phillip J. Eby

At 01:47 PM 5/24/00 +0300, Itamar Shtull-Trauring wrote:
>I add a folder, with a LoginManager in it, define Cookie Auth as only
>authntication.  Now, every time I try to view the folder I get the loginForm
>asking me to login, even though Anonymous has permissions to view the
>pages.  If I delete the loginForm this doesn't happen, I can view the page
>with no problems.
>
>How do I get the loginForm to appear only if the user doesn't have enough
>permissions?
>

Make your root acl_users a LoginManager, with the loginForm there.
LoginManager will only allow "Anonymous" to log in if it is the root
acl_users.  This is how standard user folders behave, and *have to* because
of the way manage_workspace works, unfortunately.  Until/unless a new login
protocol is worked out in Zope, this is the workaround.

(Details of the problem: manage_workspace is set up only to require the
"Anonymous" role, but then it checks whatever user is logged in for
permissions to display management tabs.  If LoginManager were to allow
Anonymous access just because the URL being hit allowed Anonymous access,
manage_workspace would deny access to the page.  Worse, it would deny it by
popping up a basic authentication dialog.  We know this because an early
version of LoginManager seemed bizarrely broken until we dug through enough
Zope code to find out what was going on, and changed LoginManager to do
what user folders do: only log in the anonymous user if you're the root
acl_users folder.)


___
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] ZCatalog and Unique IDs

2000-05-24 Thread Chris Withers

Itamar Shtull-Trauring wrote:
> > Hence the traversal interface?
> 
> Right.

Which is due to arrive in 2.2? ;-)

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] ZCatalog and Unique IDs

2000-05-24 Thread Itamar Shtull-Trauring

Chris Withers wrote:
 
> Itamar Shtull-Trauring wrote:
> > What happens when you have multiple ZODBs?  Additionaly, this breaks
> > encapsulation between the ZODB and applications built on it, which isn't
> > such a good idea.
> 
> Good, it was a stupid question. :-)

Not so stupid - I had the same discussion at IPC8 with me on the asking
side.

> I guess when you catalog objects, you should make sure you use the REAL
> path identifier though, not one that's been mangled by virtual hosting.
> 
> Hence the traversal interface?

Right.

-- 
Itamar S.T.  [EMAIL PROTECTED]

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




Re: [Zope-dev] zpatterns: rackmountables must be of-wrapped

2000-05-24 Thread Phillip J. Eby

At 05:33 PM 5/24/00 +0400, Jephte CLAIN wrote:
>Hello,
>
>I believe items got from a rack have to be wrapped in context of the
>rack. I've been bitten by this (and it hurts!). When I try to use items
>from DTML, only the superuser can use it, even managers can't access the
>objects. When I wrap the items in the context of the rack, everything is
>fine.
>So: retrieveItem, createItem use vanilla objects

retrieveItem and createItem are not intended to be public methods; the only
reason they don't begin with an "_" is that I wanted to make it possible
for them to be implemented as DTMLMethods or PythonMethods.


>getItem, newItem wrap objects before returning them

These are the API's you should be using, as they are the ones that tell the
rackmountable what rack it belongs to.


___
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] ZCatalog and Unique IDs

2000-05-24 Thread Chris Withers

Itamar Shtull-Trauring wrote:
> What happens when you have multiple ZODBs?  Additionaly, this breaks
> encapsulation between the ZODB and applications built on it, which isn't
> such a good idea.

Good, it was a stupid question. :-)

I guess when you catalog objects, you should make sure you use the REAL
path identifier though, not one that's been mangled by virtual hosting.

Hence the traversal interface?

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] ZCatalog and Unique IDs

2000-05-24 Thread Itamar Shtull-Trauring

Chris Withers wrote:

> I hope this is a stupid question but why does ZCatalog use the URL of an
> object to uniquely identify it?
> 
> Why not just use a reference to the object? Persistent object
> identifiers must exist for the ZODB so why not use them instead?

What happens when you have multiple ZODBs?  Additionaly, this breaks
encapsulation between the ZODB and applications built on it, which isn't
such a good idea.

-- 
Itamar S.T.  [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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Steve Spicklemire


Hi Chris,

The basic idea is that you can export individual zope
objects in a container to the filesystem, not to the 'var'
directory, but to a directory under CVS control. Then you can
commit, update, add, remove etc files (each of which is the 
xml representation of a zope object) and keep track of what's
what. The only commands available zope right now are 'add' 'commit'
and 'update'. You can of course use CVS in the normal way.

-steve

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

Chris> Steve Spicklemire wrote:
>> http://www.zope.org/Members/sspickle/ZCVSMixin

Chris> Sounds like a cool idea, but I don't really understand what
Chris> it does and how you use it.

Chris> Could you give use some enlightenment?

Chris> cheers,

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 )




[Zope-dev] ZCatalog and Unique IDs

2000-05-24 Thread Chris Withers

Hi,

I hope this is a stupid question but why does ZCatalog use the URL of an
object to uniquely identify it?

Why not just use a reference to the object? Persistent object
identifiers must exist for the ZODB so why not use them instead?

cheers,

Chris

PS: This would solve all the problems with ZCatalogs and virtually
hosted sites... I think the traversal interface is needed for other
reasons but it should remove ZCatalog from the list of things that need
it... not that I've just been bitten by this or anything ;-)

___
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] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Chris Withers

Steve Spicklemire wrote:
> http://www.zope.org/Members/sspickle/ZCVSMixin

Sounds like a cool idea, but I don't really understand what it does and
how you use it.

Could you give use some enlightenment?

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 )




[Zope-dev] ZCVS Mixin class... feedback sought.

2000-05-24 Thread Steve Spicklemire


Hi Folks,

This might be a dumb idea but I thought "what the hell?".
Anyway.. I don't know if this has already been done, but I just uploaded
an 'alpha alpha' class that allows maintainence of individual Zope objects
in a CVS repository. You need to set up the repository outside of Zope, but
once it's there to can really manage stuff with it. ;-)

http://www.zope.org/Members/sspickle/ZCVSMixin

Let me know what you think... if you want to help... if this
is the dumbest thing you've ever heard of. ;-) Also.. I really
try to keep up with the zope lists... but it's hopeless. If you
email me directly... I'll get back to you much sooner.

thanks,
-steve


___
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] Traversal Interface?

2000-05-24 Thread Chris Withers

Hi,

Just wondering if the new traversal interface is going to make it into
2.2?

I'm hitting the usual ZCatalog/SiteAccess problem and I'm wondering
whether or not to build Evan's patch into Squishdot 0.4.0 or wait for
the traversal interface?

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] Log-parser

2000-05-24 Thread Itamar Shtull-Trauring

"Morten W. Petersen" wrote:
> 
> I'd like to parse the var/Z2.log file, and being a bit lazy, I just tried
> to slap in an Apache log-parser utility. This doesn't work however,
> are there any utilities that can?

AFAIK it's compatible with Apache's log format.  Most any log ananlyzer will
work - I like and use webalizer: http://www.webalizer.org

-- 
Itamar S.T.  [EMAIL PROTECTED]

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




[Zope-dev] XML to SQL or XML into tables

2000-05-24 Thread Thomas Weholt

Hello,

Has anybody tried to somehow get xml-data into SQL-statements or in some
other way use xml-data as datasource for insertion into tables?
It shouldn`t be impossible, if we could just agree on some format or DTD to
use. 

Ex.




















This means the demo database and the table users allready exists of course.

Any thoughts? I know this could at least sort out alot of troubles I`m
having right now getting data from external sources into Zope.
I`m going to try and make a product or a method etc. that uses xmllib doing
this, but if anybody has done it allready I`d be very happy do "abuse" their
effort. :->

Thomas

___
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] Log-parser

2000-05-24 Thread Morten W. Petersen

I'd like to parse the var/Z2.log file, and being a bit lazy, I just tried
to slap in an Apache log-parser utility. This doesn't work however,
are there any utilities that can?

If there aren't any, why not change the log format to the standard Apache
log format?

-Morten

-
How to reply to email:
  http://home.sol.no/~vidaandr/news/OBSquoting.html (norsk)
  http://home.sol.no/~vidaandr/news/FAQquoting.html (english)

Who is the bigger fool? The fool or the fool who follows him?


___
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] Session Objects?

2000-05-24 Thread Morten W. Petersen

Are there sheets with these (and similar) notes anywhere on zope.org?
If not, maybe there should be?

-Morten


___
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] Problems with LoginManager form-based login

2000-05-24 Thread Itamar Shtull-Trauring

I add a folder, with a LoginManager in it, define Cookie Auth as only
authntication.  Now, every time I try to view the folder I get the loginForm
asking me to login, even though Anonymous has permissions to view the
pages.  If I delete the loginForm this doesn't happen, I can view the page
with no problems.

How do I get the loginForm to appear only if the user doesn't have enough
permissions?

-- 
Itamar S.T.  [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] Session Objects?

2000-05-24 Thread Morten W. Petersen

> Actually - I tell a slight lie. The DB might be hit once for each
> thread, as the ZSQL cache is not shared between Zope threads. You need
> to be aware of this as a cached result may be refreshed in one thread
> but not yet expired in another and can give ambiguous results and
> unreproducable bugs if you are not aware of it when you are developing. 

Now this is useful information.. =)

-Morten


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Chris Withers

Itamar Shtull-Trauring wrote:
> 
> "R. David Murray" wrote:
> 
> > It had better be .  It's also a one line fix to Lexicon.py.
> > Mike posted a note explaining the fix and how to retrofit it into
> > an existing site (you have to clear and rebuild the Lexicon, so
> > it becomes a little more than a one line fix).  If you can't find
> > the message in the mailing list archives, I can probably did out
> > a copy I saved somewhere...
> 
> Last I heard, this bug fix did NOT fix the key-error problem.  We are still
> getting lots of them (but it may have been fixed since in CVS.  Michel?)
> 
> --
> Itamar S.T.  [EMAIL PROTECTED]

*groan*

Somebody please tell me I'm not moving Squishdot from one broken
indexing system to another :(

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 )




[Zope-dev] zpatterns: rackmountables must be of-wrapped

2000-05-24 Thread Jephte CLAIN

Hello,

I believe items got from a rack have to be wrapped in context of the
rack. I've been bitten by this (and it hurts!). When I try to use items
from DTML, only the superuser can use it, even managers can't access the
objects. When I wrap the items in the context of the rack, everything is
fine.
So: retrieveItem, createItem use vanilla objects
getItem, newItem wrap objects before returning them

regards,
jephte clain
[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] Session Objects?

2000-05-24 Thread Stuart 'Zen' Bishop

On Tue, 23 May 2000, Adam Pawliuk wrote:

> Although there is several user characteristics that we would like to store in a 
>session object cached in server RAM, such as the user's unique system ID, greeting 
>name, etc; rather than having to hit the DB for this information on each request. 
>Basically we would like to use something similar to the session objects in ASP 
>(yuck), or Java JSP/servlet model. 
> 
> I've seen several Zope session products although they all seem to hook directly to a 
>DB and don't seem to provide memory persistence which is what we would like to use. 
> 
> Is there any existing products which do this?

Boring old ZSQL Methods actually do exactly what you want - check out the
caching options under the advanced tab (or the ZSQL docs on zope.org).
The database will only be hit the first time you call the method with
a given set of parameters, or when maximum time to cache expires.
If your GUF hooks make use of ZSQL methods, you should have a look
at tuning these too as it can be a big performance improvement.

Actually - I tell a slight lie. The DB might be hit once for each
thread, as the ZSQL cache is not shared between Zope threads. You need
to be aware of this as a cached result may be refreshed in one thread
but not yet expired in another and can give ambiguous results and
unreproducable bugs if you are not aware of it when you are developing. 

-- 
 ___
   // Zen (alias Stuart Bishop) Work: [EMAIL PROTECTED]
  // E N  Senior Systems Alchemist  Play: [EMAIL PROTECTED]
 //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-24 Thread Itamar Shtull-Trauring

"R. David Murray" wrote:

> It had better be .  It's also a one line fix to Lexicon.py.
> Mike posted a note explaining the fix and how to retrofit it into
> an existing site (you have to clear and rebuild the Lexicon, so
> it becomes a little more than a one line fix).  If you can't find
> the message in the mailing list archives, I can probably did out
> a copy I saved somewhere...

Last I heard, this bug fix did NOT fix the key-error problem.  We are still
getting lots of them (but it may have been fixed since in CVS.  Michel?)

-- 
Itamar S.T.  [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] Please Help!!! - HelpSys

2000-05-24 Thread Chris Withers

Lena wrote:
> I actually need to create a simple web-editor, something very similar to
> HelpSys, but I need to link tree items to the folders I create dynamically
> in Zope.

I'd suggest looking at the ZWiki Product, it may be exactly what you
want:

http://www.zope.org/Members/simon/ZWiki

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 )